diff options
author | 2016-02-10 16:32:54 +0200 | |
---|---|---|
committer | 2016-02-10 16:32:54 +0200 | |
commit | 0f03cc467be9c0b37310b7e2a589a86a1771c96f (patch) | |
tree | 32983679b9033b0379d2036740b796d8fe557c3f /scripts/automation/trex_control_plane/client_utils | |
parent | a69c4dd80e88b6fb4ebfae8d84366b11561d7660 (diff) |
update hltapi + functional regression + remove old packet_builder tests
Diffstat (limited to 'scripts/automation/trex_control_plane/client_utils')
-rwxr-xr-x | scripts/automation/trex_control_plane/client_utils/general_utils.py | 6 |
1 files changed, 4 insertions, 2 deletions
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 |