Merge "Fix inspect.getargspec() deprecation warning"
This commit is contained in:
commit
4be14e28ef
|
@ -46,7 +46,7 @@ class Commands(object):
|
||||||
|
|
||||||
def execute(self):
|
def execute(self):
|
||||||
exec_method = getattr(self, CONF.action.name)
|
exec_method = getattr(self, CONF.action.name)
|
||||||
args = inspect.getargspec(exec_method)
|
args = inspect.getfullargspec(exec_method)
|
||||||
args.args.remove('self')
|
args.args.remove('self')
|
||||||
kwargs = {}
|
kwargs = {}
|
||||||
for arg in args.args:
|
for arg in args.args:
|
||||||
|
|
|
@ -175,7 +175,7 @@ class MethodInspector(object):
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def argspec(self):
|
def argspec(self):
|
||||||
return inspect.getargspec(self._func)
|
return inspect.getfullargspec(self._func)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
optionals = ["[{0}=<{0}>]".format(k) for k, v in self.optional_args]
|
optionals = ["[{0}=<{0}>]".format(k) for k, v in self.optional_args]
|
||||||
|
|
Loading…
Reference in New Issue