[PATCH] Make automatic driver download also working when changing the driver

Till Kamppeter till.kamppeter at gmail.com
Sat Mar 12 09:30:41 PST 2011

When changing the PPD file of an existing print queue ("Make and
Model" in "Properties" dialog) the cupshelpers.getDevices() function
is called with the scheme of the device URI to find the printer's
device ID. The scheme needs to be supplied as ASCII string and not as
UniCode, otherwise the scheme is not recognized and the appropriate
CUPS backend does not get called. The device ID is needed to suggest
the correct drivers and to trigger automatic driver downloads.
 newprinter.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/newprinter.py b/newprinter.py
index 4aca860..f116641 100644
--- a/newprinter.py
+++ b/newprinter.py
@@ -637,7 +637,7 @@ class NewPrinterGUI(GtkGUI):
             # We'll need to know the Device ID for this device.
             if self.dialog_mode == "ppd" and not self.devid:
-                scheme = device_uri.split (":", 1)[0]
+                scheme = str(device_uri.split (":", 1)[0])
                 schemes = [scheme]
                 if scheme in ["socket", "lpd", "ipp"]:
                     schemes.extend (["snmp", "dnssd"])


More information about the Printing-architecture mailing list