Skip to content

Commit 2c97d1f

Browse files
committed
Added handling for fullargspec when running python 3 or above
1 parent 1586ec5 commit 2c97d1f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

reportportal_client/helpers.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import time
1818
import uuid
1919
import warnings
20-
from platform import machine, processor, system
20+
from platform import machine, processor, system, python_version
2121

2222
import six
2323
from pkg_resources import DistributionNotFound, get_distribution
@@ -174,7 +174,10 @@ def get_function_params(func, args, kwargs):
174174
with warnings.catch_warnings():
175175
warnings.filterwarnings('ignore', category=DeprecationWarning)
176176
# noinspection PyDeprecation
177-
arg_spec = inspect.getfullargspec(func)
177+
if python_version >= '3':
178+
arg_spec = inspect.getfullargspec(func)
179+
else:
180+
arg_spec = inspect.getargspec(func)
178181
result = dict()
179182
for i, arg_name in enumerate(arg_spec.args):
180183
if i >= len(args):

0 commit comments

Comments
 (0)