diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index adb3b03700..cf07b98ca1 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -191,7 +191,10 @@ class USBPrinterOutputDevice(PrinterOutputDevice): try: self._serial = Serial(str(self._serial_port), self._baud_rate, timeout=self._timeout, writeTimeout=self._timeout) except SerialException: - Logger.log("w", "An exception occurred while trying to create serial connection") + Logger.warning("An exception occurred while trying to create serial connection.") + return + except OSError as e: + Logger.warning("The serial device is suddenly unavailable while trying to create a serial connection: {err}".format(err = str(e))) return CuraApplication.getInstance().globalContainerStackChanged.connect(self._onGlobalContainerStackChanged) self._onGlobalContainerStackChanged()