From e3c98ee27486ab2ea668fe9190d5c09ffc6e834c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Mon, 22 Feb 2010 11:39:54 +0000 Subject: [PATCH] - Catch RuntimeError in statereason.py when cupsGetPPD2 fails (bug #566938). --- system-config-printer-cupsGetPPD2.patch | 12 ++++++++++++ system-config-printer.spec | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-cupsGetPPD2.patch diff --git a/system-config-printer-cupsGetPPD2.patch b/system-config-printer-cupsGetPPD2.patch new file mode 100644 index 0000000..50c02b6 --- /dev/null +++ b/system-config-printer-cupsGetPPD2.patch @@ -0,0 +1,12 @@ +diff -up system-config-printer-1.1.92/statereason.py.cupsGetPPD2 system-config-printer-1.1.92/statereason.py +--- system-config-printer-1.1.92/statereason.py.cupsGetPPD2 2010-02-18 16:17:48.000000000 +0100 ++++ system-config-printer-1.1.92/statereason.py 2010-02-22 12:10:09.000000000 +0100 +@@ -138,7 +138,7 @@ class StateReason: + f = self.connection.getPPD(self.printer) + self._ppd = cups.PPD (f) + os.unlink (f) +- except (cups.IPPError, OSError): ++ except (cups.IPPError, RuntimeError, OSError): + pass + + reason = self.get_reason () diff --git a/system-config-printer.spec b/system-config-printer.spec index 01200d6..9175b14 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.1.92 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base @@ -18,6 +18,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-device-ids-warning.patch +Patch4: system-config-printer-cupsGetPPD2.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -79,6 +80,7 @@ printers. %patch1 -p1 -b .no-epydoc %patch2 -p1 -b .lowercase-mfg-mdl %patch3 -p1 -b .device-ids-warning +%patch4 -p1 -b .cupsGetPPD2 %build %configure --with-udev-rules --with-polkit-1 @@ -194,6 +196,9 @@ rm -rf %buildroot exit 0 %changelog +* Mon Feb 22 2010 Jiri Popelka 1.1.92-3 +- Catch RuntimeError in statereason.py when cupsGetPPD2 fails (bug #566938). + * Sun Feb 21 2010 Tim Waugh - 1.1.92-2 - Display a warning when the wrong IEEE 1284 Device ID is detected.