From a83bcedb2261d9b4a16e2dbd58b6faa9bb611f11 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 9 Jul 2015 16:27:22 +0200 Subject: [PATCH] Catch errors when trying to close the connection thread Contributes to #82 --- plugins/USBPrinting/PrinterConnection.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/USBPrinting/PrinterConnection.py b/plugins/USBPrinting/PrinterConnection.py index a4867e656a..7ef6c759ac 100644 --- a/plugins/USBPrinting/PrinterConnection.py +++ b/plugins/USBPrinting/PrinterConnection.py @@ -255,7 +255,10 @@ 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: + pass if self._serial is not None: self.setIsConnected(False) try: