From d67a96b4f033864ffbaf53365dd0e4de458a97aa Mon Sep 17 00:00:00 2001 From: Ole Laursen Date: Wed, 20 Jan 2016 14:19:06 +0000 Subject: [PATCH] Set daemon = True on the thread in the SMTP test server running while running tests. This fixes the annoying problem of the python process staying alive after certain bugs in the test invocation or after a plain Ctrl + c. - Legacy-Id: 10718 --- ietf/utils/test_smtpserver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ietf/utils/test_smtpserver.py b/ietf/utils/test_smtpserver.py index 1475c9637..73535d010 100644 --- a/ietf/utils/test_smtpserver.py +++ b/ietf/utils/test_smtpserver.py @@ -14,7 +14,8 @@ class AsyncCoreLoopThread(object): """Start the listening service""" self.exit_condition = [] kwargs={'exit_condition':self.exit_condition,'timeout':1.0} - self.thread = threading.Thread(target=self.wrap_loop,kwargs=kwargs ) + self.thread = threading.Thread(target=self.wrap_loop, kwargs=kwargs) + self.thread.daemon = True self.thread.start() def stop(self):