From eaa8138fca60a79bc53038b67b68b333d3da8578 Mon Sep 17 00:00:00 2001 From: Martin Wilck Date: Wed, 7 Dec 2016 00:08:09 +0100 Subject: [PATCH] Fix python exception in runExternalCommand Fixes the following problem: 1 Open hp-toolbox 2 Right-click on "HP Envy 5530 Series" -> "Scan..." => nothing happens, except hourglass spinning hp-toolbox --debug shows: hp-toolbox(UI)[9026]: debug: Run: ******************** /usr/bin/xsane -V %SANE_URI% (hp:/net/ENVY_5530_series?zc=HP3464A9E628B4) ******************** hp-toolbox(UI)[9026]: debug: /usr/bin/xsane -V %SANE_URI% Traceback (most recent call last): File "/usr/share/hplip/ui4/devmgr5.py", line 907, in popup.addAction(self.__tr("Scan..."), lambda: self.contextMenuFunc(self.user_settings.cmd_scan)) File "/usr/share/hplip/ui4/devmgr5.py", line 946, in contextMenuFunc self.runExternalCommand(f) File "/usr/share/hplip/ui4/devmgr5.py", line 2166, in runExternalCommand for x in cmd.split(macro_char)]) TypeError: sequence item 0: expected string, QString found Signed-off-by: Martin Wilck --- ui5/devmgr5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py index 35bdcb7..bd250c9 100644 --- a/ui5/devmgr5.py +++ b/ui5/devmgr5.py @@ -988,7 +988,7 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow): log.debug("Opening browser to: %s" % f) utils.openURL(f) else: - self.runExternalCommand(f) + self.runExternalCommand(str(f)) QTimer.singleShot(1000, self.unlockClick) finally: -- 2.11.0