From: Leandro Lucarella Date: Wed, 10 Oct 2007 20:01:16 +0000 (-0300) Subject: Bugfix: use hasattr() right when looking for help. X-Git-Url: https://git.llucax.com/software/pymin.git/commitdiff_plain/411e573917552a233a9f9752b511396e141c1265?ds=sidebyside Bugfix: use hasattr() right when looking for help. --- diff --git a/pymin/dispatcher.py b/pymin/dispatcher.py index b5567a4..7e918bd 100644 --- a/pymin/dispatcher.py +++ b/pymin/dispatcher.py @@ -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 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