diff options
Diffstat (limited to 'yardstick/cmd')
-rwxr-xr-x | yardstick/cmd/NSBperf.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/yardstick/cmd/NSBperf.py b/yardstick/cmd/NSBperf.py index 3a6d604cd..4e7590ea5 100755 --- a/yardstick/cmd/NSBperf.py +++ b/yardstick/cmd/NSBperf.py @@ -39,13 +39,11 @@ if not PYTHONPATH or not VIRTUAL_ENV: raise SystemExit(1) -def handler(): +def sigint_handler(*args, **kwargs): """ Capture ctrl+c and exit cli """ subprocess.call(["pkill", "-9", "yardstick"]) raise SystemExit(1) -signal.signal(signal.SIGINT, handler) - class YardstickNSCli(object): """ This class handles yardstick network serivce testing """ @@ -215,5 +213,6 @@ class YardstickNSCli(object): self.run_test(args, test_path) if __name__ == "__main__": + signal.signal(signal.SIGINT, sigint_handler) NS_CLI = YardstickNSCli() NS_CLI.main() |