From 8cf30efb32697ed43fe7982a0e3f39f9c120fc1f Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sat, 23 Aug 2014 19:58:08 +0200 Subject: [PATCH] Remove a stupid and useless exception handler Don't explicitly handle KeyboardInterrupt in the mail thread as it doesn't seem it ever was of of any use, and could actually lead to a deadlock as it would terminate the in-thread loop without emptying the queue, leading to `queue.join()` in `quit()` to wait forever for the queue to empty. --- lib/mails.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/mails.py b/lib/mails.py index 17f5860..39857e8 100644 --- a/lib/mails.py +++ b/lib/mails.py @@ -52,8 +52,6 @@ class ThreadedSMTP(object): except queue.Empty: server = self.__server_quit(server) task_eaten = False # we didn't eat a task, just timeout - except KeyboardInterrupt as e: - break else: if len(args) or len(kwargs): # ignore empty items try: -- GitLab