diff options
-rw-r--r-- | cmd2/cmd2.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 25251bef..2215f818 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -432,7 +432,8 @@ class Cmd(cmd.Cmd): cmdset.on_register(self) methods = inspect.getmembers( cmdset, - predicate=lambda meth: inspect.ismethod(meth) and meth.__name__.startswith(COMMAND_FUNC_PREFIX)) + predicate=lambda meth: (inspect.ismethod(meth) or isinstance(meth, Callable)) and + meth.__name__.startswith(COMMAND_FUNC_PREFIX)) installed_attributes = [] try: |