X-Git-Url: https://git.llucax.com/software/pymin.git/blobdiff_plain/d46203541c7463746edf19344d3ddbd1fb412128..92f311f91952623a83b6cb5c31f6e3c7c052df16:/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__':