getargspec -> getfullargspec

former is deprecated since Python 3.0
This commit is contained in:
KIU Shueng Chuan 2021-02-06 16:50:35 +08:00
parent e7ceebd867
commit c85c62deda

View File

@ -603,7 +603,7 @@ def runSubprocess(command, return_code=False, **kwargs):
if p.returncode != 0: if p.returncode != 0:
print(output) print(output)
err_fun = sp.CalledProcessError.__init__ err_fun = sp.CalledProcessError.__init__
if 'output' in inspect.getargspec(err_fun).args: if 'output' in inspect.getfullargspec(err_fun).args:
raise sp.CalledProcessError(p.returncode, command, output) raise sp.CalledProcessError(p.returncode, command, output)
else: else:
raise sp.CalledProcessError(p.returncode, command) raise sp.CalledProcessError(p.returncode, command)