diff options
author | imarom <imarom@cisco.com> | 2016-04-12 14:26:10 +0300 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2016-04-12 14:59:59 +0300 |
commit | 5a26a09958318032868d82a7d2d0207464e1af2d (patch) | |
tree | cdf99b60d8b298a5f4fc6fbd2e431dcd442aebb0 /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_types.py | |
parent | 2a3c0616c8cfb6b11a83ab8dc6a45e315d16bd26 (diff) |
events API and RX core util.
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_types.py')
-rw-r--r-- | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_types.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_types.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_types.py index f3ac5c65..f6718fda 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_types.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_types.py @@ -140,6 +140,11 @@ def verify_exclusive_arg (args_list): if not (len(list(filter(lambda x: x is not None, args_list))) == 1): raise STLError('exactly one parameter from {0} should be provided'.format(args_list)) +def listify (x): + if isinstance(x, list): + return x + else: + return [x] # shows as 'N/A', but does not let any compares for user to not mistake in automation class StatNotAvailable(object): |