summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py')
-rwxr-xr-xscripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
index 010d966c..e7b46aea 100755
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
@@ -1003,7 +1003,11 @@ class STLClient(object):
if connected and not client.is_connected():
raise STLStateError(func_name, 'disconnected')
- ret = f(*args, **kwargs)
+ try:
+ ret = f(*args, **kwargs)
+ except KeyboardInterrupt as e:
+ raise STLError("Test was interrupted by a keyboard signal (probably ctrl + c)")
+
return ret
return wrap2
@@ -2836,4 +2840,4 @@ class STLClient(object):
if opts.clear:
self.clear_events()
- \ No newline at end of file
+