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