Skip to content

Commit f3b0ac7

Browse files
committed
Used builtin aenum variable to determine if script is running in py2 or py3
1 parent 2c97d1f commit f3b0ac7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

reportportal_client/helpers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
import time
1818
import uuid
1919
import warnings
20-
from platform import machine, processor, system, python_version
20+
from platform import machine, processor, system
21+
from aenum import PY3
2122

2223
import six
2324
from pkg_resources import DistributionNotFound, get_distribution
@@ -26,7 +27,6 @@
2627

2728
logger = logging.getLogger(__name__)
2829

29-
3030
def generate_uuid():
3131
"""Generate UUID."""
3232
return str(uuid.uuid4())
@@ -174,7 +174,7 @@ def get_function_params(func, args, kwargs):
174174
with warnings.catch_warnings():
175175
warnings.filterwarnings('ignore', category=DeprecationWarning)
176176
# noinspection PyDeprecation
177-
if python_version >= '3':
177+
if PY3:
178178
arg_spec = inspect.getfullargspec(func)
179179
else:
180180
arg_spec = inspect.getargspec(func)

0 commit comments

Comments
 (0)