From 25820ee4cde8b01285c7556ad1d50aa1d652d92a Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 18 Mar 2010 17:15:41 +0000 Subject: [PATCH] - Fixed traceback in check-driver-ids.py when no drivers are found (bug #574827). --- system-config-printer-cdi-no-drivers.patch | 12 ++++++++++++ system-config-printer.spec | 11 ++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-cdi-no-drivers.patch diff --git a/system-config-printer-cdi-no-drivers.patch b/system-config-printer-cdi-no-drivers.patch new file mode 100644 index 0000000..b973dfb --- /dev/null +++ b/system-config-printer-cdi-no-drivers.patch @@ -0,0 +1,12 @@ +diff -up system-config-printer-1.2.0/check-device-ids.py.cdi-no-drivers system-config-printer-1.2.0/check-device-ids.py +--- system-config-printer-1.2.0/check-device-ids.py.cdi-no-drivers 2010-03-17 14:20:35.000000000 +0000 ++++ system-config-printer-1.2.0/check-device-ids.py 2010-03-18 16:29:56.065865306 +0000 +@@ -167,7 +167,7 @@ for device, attrs in devices.iteritems ( + try: + drivers = ppds.ids[id_fields['MFG'].lower ()][id_fields['MDL'].lower ()] + except KeyError: +- drivers = None ++ drivers = [] + + if i < n: + more = unichr (0x2502) diff --git a/system-config-printer.spec b/system-config-printer.spec index a705082..25db949 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -7,7 +7,7 @@ Summary: A printer administration tool Name: system-config-printer Version: 1.2.0 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -19,6 +19,7 @@ Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Patch1: system-config-printer-no-epydoc.patch Patch2: system-config-printer-lowercase-mfg-mdl.patch +Patch3: system-config-printer-cdi-no-drivers.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -83,6 +84,10 @@ printers. # Convert InstallPrinterDriver requests to lower-case. %patch2 -p1 -b .lowercase-mfg-mdl +# Fixed traceback in check-driver-ids.py when no drivers are found +# (bug #574827). +%patch3 -p1 -b .cdi-no-drivers + %build %configure --with-udev-rules @@ -198,6 +203,10 @@ rm -rf %buildroot exit 0 %changelog +* Thu Mar 18 2010 Tim Waugh - 1.2.0-2 +- Fixed traceback in check-driver-ids.py when no drivers are found + (bug #574827). + * Wed Mar 17 2010 Tim Waugh - 1.2.0-1 - Updated to pycups-1.9.49. - 1.2.0: