summaryrefslogtreecommitdiff
path: root/cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'cli.py')
-rw-r--r--cli.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli.py b/cli.py
index 977ceca..6e1a726 100644
--- a/cli.py
+++ b/cli.py
@@ -173,7 +173,7 @@ class CLIHelper:
print
for command_help_method in self._topics[command]:
try:
- if callable(command_help_method):
+ if hasattr(command_help_method, '__call__'):
self._print_help(*command_help_method())
else:
self._print_help(*command_help_method)
@@ -181,7 +181,7 @@ class CLIHelper:
import traceback
traceback.print_exc()
print 'ERROR in help method %s'% (
- command_help_method.func_name)
+ command_help_method.__name__)
help_do_help = ("help", "help [topic|command]",
_("print help message for the given topic/command or \