Merge pull request #1640 from bookofportals/command-callable-check

Change callability check
This commit is contained in:
Griatch 2018-07-31 09:09:50 +02:00 committed by GitHub
commit 9a7967f1ee

View file

@ -296,9 +296,9 @@ class CmdSet(with_metaclass(_CmdSetMeta, object)):
result (any): An instantiated Command or the input unmodified.
"""
try:
if callable(cmd):
return cmd()
except TypeError:
else:
return cmd
def _duplicate(self):