From f5be6867c865da322fa9e5460e68e3b9c0509bb0 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Tue, 28 Apr 2020 22:17:47 +0200 Subject: [PATCH] "license" is a python built-in and we should not shadow that name --- MultiServer.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/MultiServer.py b/MultiServer.py index 1b0ce789..c88a91d9 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -459,6 +459,7 @@ class CommandProcessor(metaclass=CommandMeta): method = self.commands.get(basecommand[1:].lower(), None) if not method: self._error_unknown_command(basecommand[1:]) + return False else: if getattr(method, "raw_text", False): # method is requesting unprocessed text data arg = raw.split(maxsplit=1) @@ -498,11 +499,11 @@ class CommandProcessor(metaclass=CommandMeta): def _cmd_license(self): """Returns the licensing information""" - license = getattr(CommandProcessor, "license", None) - if not license: + mw_license = getattr(CommandProcessor, "license", None) + if not mw_license: with open(Utils.local_path("LICENSE")) as f: - CommandProcessor.license = license = f.read() - self.output(CommandProcessor.license) + CommandProcessor.license = mw_license = f.read() + self.output(mw_license) def default(self, raw: str): self.output("Echo: " + raw)