diff options
author | Jaime van Kessel <nallath@gmail.com> | 2015-06-02 16:35:15 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2015-06-02 16:35:15 +0300 |
commit | 7fda5c84e70a414705d1b3c632a10fdf977d9948 (patch) | |
tree | 9450c1555fe8e02ae7d2dfceb27c911d3664d627 /plugins/USBPrinting/PrinterConnection.py | |
parent | c5fd9571705a44996eb52401815325d4d2143311 (diff) |
Added extra exception catching for thread joining
Diffstat (limited to 'plugins/USBPrinting/PrinterConnection.py')
-rw-r--r-- | plugins/USBPrinting/PrinterConnection.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/USBPrinting/PrinterConnection.py b/plugins/USBPrinting/PrinterConnection.py index ad231f5207..3a953c3744 100644 --- a/plugins/USBPrinting/PrinterConnection.py +++ b/plugins/USBPrinting/PrinterConnection.py @@ -241,7 +241,11 @@ class PrinterConnection(SignalEmitter): ## Close the printer connection def close(self): if self._connect_thread.isAlive(): - self._connect_thread.join() + try: + self._connect_thread.join() + except Exception as e: + pass # This should work, but it does fail sometimes for some reason + if self._serial is not None: self.setIsConnected(False) self._listen_thread.join() |