From b979f6c954fddc614df041f6740d279bc99653d9 Mon Sep 17 00:00:00 2001 From: Anna Petrasova Date: Fri, 7 Feb 2020 15:26:32 -0500 Subject: [PATCH] replace deprecated inspect function (#334) --- gui/wxpython/core/gconsole.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gui/wxpython/core/gconsole.py b/gui/wxpython/core/gconsole.py index fa3c4f989c3..56a5ec78a10 100644 --- a/gui/wxpython/core/gconsole.py +++ b/gui/wxpython/core/gconsole.py @@ -538,7 +538,10 @@ def RunCmd(self, command, compReg=True, env=None, skipInterface=False, command[0]) pymodule = imp.load_source( command[0].replace('.', '_'), pyPath) - pymain = inspect.getargspec(pymodule.main) + try: # PY3 + pymain = inspect.getfullargspec(pymodule.main) + except AttributeError: + pymain = inspect.getargspec(pymodule.main) if pymain and 'giface' in pymain.args: pymodule.main(self._giface) return