From 3117eab2951df10e3e9bddc858b3a8c3e38628f6 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Tue, 12 Apr 2016 02:49:21 +0300 Subject: hltapi: modify and remove traffic fixes --- .../trex_control_plane/stl/trex_stl_lib/utils/common.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/common.py') diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/common.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/common.py index ae74e932..e176ca99 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/common.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/common.py @@ -49,11 +49,12 @@ def random_id_gen(length=8): # try to get number from input, return None in case of fail def get_number(input): try: - if type(input) in (int, long): - return input - return int(input) + return long(input) except: - return None + try: + return int(input) + except: + return None def list_intersect(l1, l2): return list(filter(lambda x: x in l2, l1)) -- cgit 1.2.3-korg