From 97f8dda84bce1f7741c13079e0b693f2a3af402a Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauld.mccarthy@gmail.com>
Date: Fri, 6 May 2016 15:15:12 +0100
Subject: [PATCH] Hack made a bit more specific.

---
 fsl/utils/status.py | 33 ++++++++++++++++-----------------
 1 file changed, 16 insertions(+), 17 deletions(-)

diff --git a/fsl/utils/status.py b/fsl/utils/status.py
index 54b6ce6e4..5a5c1e6f0 100644
--- a/fsl/utils/status.py
+++ b/fsl/utils/status.py
@@ -150,25 +150,24 @@ class ClearThread(threading.Thread):
         (via a call to :func:`clearStatus`).
         """
 
-        # http://bugs.python.org/issue14623
-        #
-        # When the main thread exits, daemon threads will
-        # continue to run after the threading module is
-        # destroyed. Calls to the Event methods can thus
-        # result in errors.
-        try:
-
-            while True:
-
-                self.__vetoEvent .clear()
-                self.__clearEvent.wait()
-                self.__clearEvent.clear()
-
+        while True:
+
+            self.__vetoEvent .clear()
+            self.__clearEvent.wait()
+            self.__clearEvent.clear()
+
+            # http://bugs.python.org/issue14623
+            #
+            # When the main thread exits, daemon threads will
+            # continue to run after the threading module is
+            # destroyed. Calls to the Event methods can thus
+            # result in errors.
+            try:
                 if not self.__clearEvent.wait(self.__timeout) and \
                    not self.__vetoEvent.isSet():
 
                     log.debug('Timeout - clearing status')
                     clearStatus()
-
-        except:
-            pass
+                    
+            except TypeError:
+                return
-- 
GitLab