diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index ae442fbf4..c44280353 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -314,7 +314,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): ## Try to connect the serial. This simply starts the thread, which runs _connect. @pyqtSlot() def _connect(self): - if not self._update_firmware_thread._updating_firmware and not self._connect_thread.isAlive() and self._connection_state in [ConnectionState.closed, ConnectionState.error]: + if not self._update_firmware_thread._updating_firmware and not self._connect_thread.is_alive() and self._connection_state in [ConnectionState.closed, ConnectionState.error]: self._connect_thread.start() ## Upload new firmware to machine @@ -636,11 +636,11 @@ class ConnectThread: def start(self): return self._thread.start() - def isAlive(self): - return self._thread.isAlive() + def is_alive(self): + return self._thread.is_alive() def wrapup(self): - if self._thread.isAlive(): + if self._thread.is_alive(): try: # TODO: to avoid waiting indefinitely, notify the thread that it needs # to return immediatly.