diff options
Diffstat (limited to 'scripts/automation/trex_control_plane/client_utils')
-rwxr-xr-x | scripts/automation/trex_control_plane/client_utils/parsing_opts.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/automation/trex_control_plane/client_utils/parsing_opts.py b/scripts/automation/trex_control_plane/client_utils/parsing_opts.py index 43c97a1d..230ff822 100755 --- a/scripts/automation/trex_control_plane/client_utils/parsing_opts.py +++ b/scripts/automation/trex_control_plane/client_utils/parsing_opts.py @@ -47,10 +47,10 @@ def check_negative(value): def match_time_unit(val): '''match some val against time shortcut inputs ''' - match = re.match("^(\d+)([m|h]?)$", val) + match = re.match("^(\d+(\.\d+)?)([m|h]?)$", val) if match: - digit = int(match.group(1)) - unit = match.group(2) + digit = float(match.group(1)) + unit = match.group(3) if not unit: return digit elif unit == 'm': |