]> git.llucax.com Git - software/pymin.git/commitdiff
Bugfix: use hasattr() right when looking for help.
authorLeandro Lucarella <llucarella@integratech.com.ar>
Wed, 10 Oct 2007 20:01:16 +0000 (17:01 -0300)
committerLeandro Lucarella <llucarella@integratech.com.ar>
Wed, 10 Oct 2007 20:31:18 +0000 (17:31 -0300)
pymin/dispatcher.py

index b5567a4747e47a854b232dc58a97e3559e65c629..7e918bd113bf6c1b37ad3c911d949dfc1307be21 100644 (file)
@@ -209,7 +209,7 @@ class Handler:
         if not hasattr(self, command.encode('utf-8')):
             raise HelpNotFoundError(command)
         handler = getattr(self, command.encode('utf-8'))
         if not hasattr(self, command.encode('utf-8')):
             raise HelpNotFoundError(command)
         handler = getattr(self, command.encode('utf-8'))
-        if not is_handler(handler) and not hasattr(handler):
+        if not is_handler(handler) and not hasattr(handler, 'handler_help'):
             raise HelpNotFoundError(command)
         return handler.handler_help
 
             raise HelpNotFoundError(command)
         return handler.handler_help