Don't use inspect.getfullargspec().

It seems to be deprecated in Python 3.5.
This commit is contained in:
Florian Bruhin 2015-08-16 15:43:28 +02:00
parent 402f9be7e9
commit 3bfd049a0a

View File

@ -161,7 +161,8 @@ class Command:
elif 'self' not in signature.parameters and self._instance is not None: elif 'self' not in signature.parameters and self._instance is not None:
raise TypeError("{} is not a class method, but instance was " raise TypeError("{} is not a class method, but instance was "
"given!".format(self.name[0])) "given!".format(self.name[0]))
elif inspect.getfullargspec(self.handler).varkw is not None: elif any(param.kind == inspect.Parameter.VAR_KEYWORD
for param in signature.parameters.values()):
raise TypeError("{}: functions with varkw arguments are not " raise TypeError("{}: functions with varkw arguments are not "
"supported!".format(self.name[0])) "supported!".format(self.name[0]))