- Avoid traceback in IPP notification handlers (bug #530641).

This commit is contained in:
Tim Waugh 2009-10-30 12:39:52 +00:00
parent 7b7a93c0dd
commit cd24abd8d1
2 changed files with 49 additions and 1 deletions

View File

@ -0,0 +1,45 @@
diff -up system-config-printer-1.1.13/system-config-printer.py.notification-traceback system-config-printer-1.1.13/system-config-printer.py
--- system-config-printer-1.1.13/system-config-printer.py.notification-traceback 2009-10-30 12:36:24.901645742 +0000
+++ system-config-printer-1.1.13/system-config-printer.py 2009-10-30 12:36:34.610518996 +0000
@@ -3494,8 +3494,11 @@ class GUI(GtkGUI, monitor.Watcher):
self.dests_iconview_selection_changed (self.dests_iconview)
gobject.idle_add (deferred_refresh)
if self.PrinterPropertiesDialog.get_property('visible'):
- self.printer.getAttributes ()
- self.updatePrinterProperties ()
+ try:
+ self.printer.getAttributes ()
+ self.updatePrinterProperties ()
+ except cups.IPPError:
+ pass
gtk.gdk.threads_leave ()
@@ -3507,8 +3510,11 @@ class GUI(GtkGUI, monitor.Watcher):
monitor.Watcher.state_reason_added (self, mon, reason)
gtk.gdk.threads_enter ()
if self.PrinterPropertiesDialog.get_property('visible'):
- self.printer.getAttributes ()
- self.updatePrinterProperties ()
+ try:
+ self.printer.getAttributes ()
+ self.updatePrinterProperties ()
+ except cups.IPPError:
+ pass
gtk.gdk.threads_leave ()
@@ -3516,8 +3522,11 @@ class GUI(GtkGUI, monitor.Watcher):
monitor.Watcher.state_reason_removed (self, mon, reason)
gtk.gdk.threads_enter ()
if self.PrinterPropertiesDialog.get_property('visible'):
- self.printer.getAttributes ()
- self.updatePrinterProperties ()
+ try:
+ self.printer.getAttributes ()
+ self.updatePrinterProperties ()
+ except cups.IPPError:
+ pass
gtk.gdk.threads_leave ()

View File

@ -7,7 +7,7 @@
Summary: A printer administration tool
Name: system-config-printer
Version: 1.1.13
Release: 5%{?dist}
Release: 6%{?dist}
License: GPLv2+
URL: http://cyberelk.net/tim/software/system-config-printer/
Group: System Environment/Base
@ -32,6 +32,7 @@ Patch14: system-config-printer-troubleshoot-network-printers.patch
Patch15: system-config-printer-strip-zjs.patch
Patch16: system-config-printer-custom-state-reasons.patch
Patch17: system-config-printer-no-epydoc.patch
Patch18: system-config-printer-notification-traceback.patch
BuildRequires: cups-devel >= 1.2
BuildRequires: python-devel >= 2.4
@ -108,6 +109,7 @@ printers.
%patch15 -p1 -b .strip-zjs
%patch16 -p1 -b .custom-state-reasons
%patch17 -p1 -b .no-epydoc
%patch18 -p1 -b .notification-traceback
%build
%configure --with-udev-rules --with-polkit-1
@ -220,6 +222,7 @@ exit 0
%changelog
* Fri Oct 30 2009 Tim Waugh <twaugh@redhat.com> 1.1.13-6
- Avoid traceback in IPP notification handlers (bug #530641).
- Avoid epydoc dependency.
* Thu Oct 29 2009 Tim Waugh <twaugh@redhat.com> 1.1.13-5