Merge pull request #1117 from forslund/bugfix/inspect-failure

Add workaround for inspect-decorator problem
pull/1130/head
Åke 2017-10-04 07:08:15 +02:00 committed by GitHub
commit b850143824
1 changed files with 7 additions and 0 deletions

View File

@ -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: