From 846c55a99d0486bea3623e47412c36d0ab71f0fe Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 31 Jul 2018 09:47:18 +0200 Subject: [PATCH] Simplify detection of url-encoded filepatch --- plugins/USBPrinting/USBPrinterOutputDevice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 6a97a3c163..7c4d85a5cd 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -127,8 +127,8 @@ class USBPrinterOutputDevice(PrinterOutputDevice): @pyqtSlot(str) def updateFirmware(self, file): - # the file path could be qurl encoded. - if file[:7] == "file://": + # the file path could be url-encoded. + if file.startswith("file://"): self._firmware_location = QUrl(file).toLocalFile() else: self._firmware_location = file