Merge pull request #1117 from forslund/bugfix/inspect-failure
Add workaround for inspect-decorator problempull/1130/head
commit
b850143824
|
@ -347,6 +347,13 @@ class MycroftSkill(object):
|
|||
handler(self, message)
|
||||
elif len(getargspec(handler).args) == 1:
|
||||
handler(self)
|
||||
elif len(getargspec(handler).args) == 0:
|
||||
# Zero may indicate multiple decorators, trying the
|
||||
# usual call signatures
|
||||
try:
|
||||
handler(self, message)
|
||||
except TypeError:
|
||||
handler(self)
|
||||
else:
|
||||
raise TypeError
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue