From 0f03cc467be9c0b37310b7e2a589a86a1771c96f Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Wed, 10 Feb 2016 16:32:54 +0200 Subject: update hltapi + functional regression + remove old packet_builder tests --- scripts/automation/trex_control_plane/client_utils/general_utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts/automation/trex_control_plane/client_utils') diff --git a/scripts/automation/trex_control_plane/client_utils/general_utils.py b/scripts/automation/trex_control_plane/client_utils/general_utils.py index 3d55bc3e..9a510ec5 100755 --- a/scripts/automation/trex_control_plane/client_utils/general_utils.py +++ b/scripts/automation/trex_control_plane/client_utils/general_utils.py @@ -90,9 +90,11 @@ def id_count_gen(): yield return_id return_id += 1 -# try to get integer from input, return None in case of fail -def get_integer(input): +# 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) except: return None -- cgit 1.2.3-korg