X-Git-Url: https://git.llucax.com/software/pymin.git/blobdiff_plain/d46203541c7463746edf19344d3ddbd1fb412128..e3a8b7916e9d8506a53bbcf1039816a7caecd1ac:/dispatcher.py?ds=sidebyside 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__':