Catch errors when trying to close the connection thread

Contributes to #82
This commit is contained in:
Arjen Hiemstra 2015-07-09 16:27:22 +02:00
parent ae89ef37c0
commit a83bcedb22

View file

@ -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: