diff --git a/mitterlib/ui/ui_pygtk.py b/mitterlib/ui/ui_pygtk.py index 8ab9b09..9a23838 100644 --- a/mitterlib/ui/ui_pygtk.py +++ b/mitterlib/ui/ui_pygtk.py @@ -118,7 +118,7 @@ class _WorkerThread(threading.Thread, _IdleObject): result = self._function(*args, **kwargs) except Exception, exc: # Catch ALL exceptions # TODO: Check if this catch all warnins too! - _log.debug('Exception %s', str(exc)) + _log.debug('Exception inside thread: %s', str(exc)) self.emit("exception", exc) return @@ -177,6 +177,7 @@ class _ThreadManager(object): thread.connect('completed', complete_cb) thread.connect('completed', self._remove_thread) thread.connect('exception', exception_cb) + thread.connect('exception', self._remove_thread) thread.setName(thread_id) if len(self._running) < self._max_threads: