X-Git-Url: https://git.llucax.com/software/pymin.git/blobdiff_plain/d46203541c7463746edf19344d3ddbd1fb412128..2269d334bc9d3ae1c0de8229875b068e4cb29ac9:/dispatcher.py diff --git a/dispatcher.py b/dispatcher.py index addd45f..0284da5 100644 --- a/dispatcher.py +++ b/dispatcher.py @@ -27,7 +27,7 @@ class Error(RuntimeError): self.command = command def __str__(self): - return ' '.join(self.command) + return 'Command not found: "%s"' % ' '.join(self.command) class CommandNotFoundError(Error): r""" @@ -108,7 +108,7 @@ class Dispatcher: raise CommandNotFoundError(command) handler = getattr(handler, route[0]) route = route[1:] - handler(*route) + return handler(*route) if __name__ == '__main__':