Fix checking for args

This commit is contained in:
Michael Droettboom 2015-09-16 06:45:51 -04:00
parent 859259ddae
commit 9c19728d2b
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ if hasattr(inspect, 'signature'):
return str(inspect.signature(func)) return str(inspect.signature(func))
else: else:
def _has_positional_arg(func): def _has_positional_arg(func):
return inspect.getargspec(func)[0] is not None return bool(inspect.getargspec(func).args)
def _format_args(func): def _format_args(func):
return inspect.formatargspec(*inspect.getargspec(func)) return inspect.formatargspec(*inspect.getargspec(func))