Ignore errors from attempting to install a SIGINT handler from a thread
other than the main thread, e.g. if you use another harness (not oft)
to launch the test case
diff --git a/tests/serial_failover.py b/tests/serial_failover.py
index 600c50b..90a4236 100644
--- a/tests/serial_failover.py
+++ b/tests/serial_failover.py
@@ -141,7 +141,12 @@
def setUp(self):
self.logger = serial_failover_logger
self.config = serial_failover_config
- signal.signal(signal.SIGINT, self.sig_handler)
+ #@todo Test cases shouldn't monkey with signals; move SIGINT handler
+ # to top-level oft
+ try:
+ signal.signal(signal.SIGINT, self.sig_handler)
+ except ValueError, e:
+ serial_failover_logger.info("Could not set SIGINT handler: %s" % e)
serial_failover_logger.info("** START TEST CASE " + str(self))
self.test_timeout = test_param_get(serial_failover_config,