"license" is a python built-in and we should not shadow that name
This commit is contained in:
parent
a751717773
commit
f5be6867c8
|
@ -459,6 +459,7 @@ class CommandProcessor(metaclass=CommandMeta):
|
||||||
method = self.commands.get(basecommand[1:].lower(), None)
|
method = self.commands.get(basecommand[1:].lower(), None)
|
||||||
if not method:
|
if not method:
|
||||||
self._error_unknown_command(basecommand[1:])
|
self._error_unknown_command(basecommand[1:])
|
||||||
|
return False
|
||||||
else:
|
else:
|
||||||
if getattr(method, "raw_text", False): # method is requesting unprocessed text data
|
if getattr(method, "raw_text", False): # method is requesting unprocessed text data
|
||||||
arg = raw.split(maxsplit=1)
|
arg = raw.split(maxsplit=1)
|
||||||
|
@ -498,11 +499,11 @@ class CommandProcessor(metaclass=CommandMeta):
|
||||||
|
|
||||||
def _cmd_license(self):
|
def _cmd_license(self):
|
||||||
"""Returns the licensing information"""
|
"""Returns the licensing information"""
|
||||||
license = getattr(CommandProcessor, "license", None)
|
mw_license = getattr(CommandProcessor, "license", None)
|
||||||
if not license:
|
if not mw_license:
|
||||||
with open(Utils.local_path("LICENSE")) as f:
|
with open(Utils.local_path("LICENSE")) as f:
|
||||||
CommandProcessor.license = license = f.read()
|
CommandProcessor.license = mw_license = f.read()
|
||||||
self.output(CommandProcessor.license)
|
self.output(mw_license)
|
||||||
|
|
||||||
def default(self, raw: str):
|
def default(self, raw: str):
|
||||||
self.output("Echo: " + raw)
|
self.output("Echo: " + raw)
|
||||||
|
|
Loading…
Reference in New Issue