system-config-printer/system-config-printer-cdi-filename.patch

22 lines
784 B
Diff

diff -up system-config-printer-1.2.0/check-device-ids.py.cdi-filename system-config-printer-1.2.0/check-device-ids.py
--- system-config-printer-1.2.0/check-device-ids.py.cdi-filename 2010-03-19 12:39:49.195620887 +0000
+++ system-config-printer-1.2.0/check-device-ids.py 2010-03-19 12:40:09.012748969 +0000
@@ -115,16 +115,13 @@ makes = ppds.getMakes ()
def driver_uri_to_filename (uri):
schemeparts = uri.split (':', 2)
- if len (schemeparts) < 1:
+ if len (schemeparts) < 2:
return "/usr/share/cups/model/" + uri
scheme = schemeparts[0]
if scheme != "drv":
return "/usr/lib/cups/driver/" + scheme
- if len (schemeparts) < 2:
- return ""
-
rest = schemeparts[1]
rest = rest.lstrip ('/')
parts = rest.split ('/')