From 1472dfc528ce020ac0a6882dabf8628f23120947 Mon Sep 17 00:00:00 2001 From: pawezka Date: Thu, 27 Jun 2024 15:51:38 +0200 Subject: [PATCH] getargspec fix (#120) * increase version to 2.3.3 * replace getfullargspec with getargspec * added check if is python3 --------- Co-authored-by: Pawel Pawezka --- src/main/python/RemoteSwingLibrary.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/python/RemoteSwingLibrary.py b/src/main/python/RemoteSwingLibrary.py index 39374a9..b41eacd 100644 --- a/src/main/python/RemoteSwingLibrary.py +++ b/src/main/python/RemoteSwingLibrary.py @@ -115,7 +115,7 @@ def _tobool(value): return str(value).lower() in ("true", "1", "yes") -__version__ = '2.3.2' +__version__ = '2.3.3' class RemoteSwingLibrary(object): @@ -630,7 +630,10 @@ def get_keyword_arguments(self, name): return swinglibrary.keyword_arguments[name] def _get_args(self, method_name): - spec = inspect.getfullargspec(getattr(self, method_name)) + if IS_PYTHON3: + spec = inspect.getfullargspec(getattr(self, method_name)) + else: + spec = inspect.getargspec(getattr(self, method_name)) args = spec[0][1:] if spec[3]: for i, item in enumerate(reversed(spec[3])):