rpms/system-config-printer/F-12 system-config-printer-rename-error-handling.patch, NONE, 1.1 system-config-printer.spec, 1.354, 1.355

Tim Waugh twaugh at fedoraproject.org
Wed Feb 3 15:49:58 UTC 2010


Author: twaugh

Update of /cvs/pkgs/rpms/system-config-printer/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9459

Modified Files:
	system-config-printer.spec 
Added Files:
	system-config-printer-rename-error-handling.patch 
Log Message:
* Wed Feb  3 2010 Tim Waugh <twaugh at redhat.com> - 1.1.16-14
- Better error handling when renaming a printer (bug #561182).


system-config-printer-rename-error-handling.patch:
 system-config-printer.py |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

--- NEW FILE system-config-printer-rename-error-handling.patch ---
diff -up system-config-printer-1.1.16/system-config-printer.py.rename-error-handling system-config-printer-1.1.16/system-config-printer.py
--- system-config-printer-1.1.16/system-config-printer.py.rename-error-handling	2010-02-03 15:18:11.718210457 +0000
+++ system-config-printer-1.1.16/system-config-printer.py	2010-02-03 15:18:29.283212210 +0000
@@ -2944,6 +2944,10 @@ class GUI(GtkGUI, monitor.Watcher):
         except RuntimeError:
             # Perhaps cupsGetPPD2 failed for a browsed printer
             pass
+        except cups.IPPError, (e, m):
+            show_IPP_Error (e, m, self.PrintersWindow)
+            self.populateList ()
+            return
 
         if not self.is_rename_possible (old_name):
             return
@@ -2969,13 +2973,15 @@ class GUI(GtkGUI, monitor.Watcher):
             # Restore original accepting/rejecting state.
             if not rejecting:
                 try:
-                    self.printers[old_name].setAccepting (True)
+                    self.printer.name = old_name
+                    self.printer.setAccepting (True)
                 except cups.HTTPError, (s,):
                     show_HTTP_Error (s, self.PrintersWindow)
                 except cups.IPPError, (e, msg):
                     show_IPP_Error (e, msg, self.PrintersWindow)
 
             self.cups._end_operation ()
+            self.populateList ()
             return
 
         # Restore rejecting state.


Index: system-config-printer.spec
===================================================================
RCS file: /cvs/pkgs/rpms/system-config-printer/F-12/system-config-printer.spec,v
retrieving revision 1.354
retrieving revision 1.355
diff -u -p -r1.354 -r1.355
--- system-config-printer.spec	25 Jan 2010 16:27:35 -0000	1.354
+++ system-config-printer.spec	3 Feb 2010 15:49:58 -0000	1.355
@@ -7,7 +7,7 @@
 Summary: A printer administration tool
 Name: system-config-printer
 Version: 1.1.16
-Release: 13%{?dist}
+Release: 14%{?dist}
 License: GPLv2+
 URL: http://cyberelk.net/tim/software/system-config-printer/
 Group: System Environment/Base
@@ -35,6 +35,7 @@ Patch17: system-config-printer-asyncpk0-
 Patch18: system-config-printer-async-fallback-2.patch
 Patch19: system-config-printer-raw-statereason.patch
 Patch20: system-config-printer-duplicate-current.patch
+Patch21: system-config-printer-rename-error-handling.patch
 
 BuildRequires: cups-devel >= 1.2
 BuildRequires: python-devel >= 2.4
@@ -114,6 +115,7 @@ printers.
 %patch18 -p1 -b .async-fallback-2
 %patch19 -p1 -b .raw-statereason
 %patch20 -p1 -b .duplicate-current
+%patch21 -p1 -b .rename-error-handling
 
 %build
 %configure --with-udev-rules --with-polkit-1
@@ -230,6 +232,9 @@ rm -rf %buildroot
 exit 0
 
 %changelog
+* Wed Feb  3 2010 Tim Waugh <twaugh at redhat.com> - 1.1.16-14
+- Better error handling when renaming a printer (bug #561182).
+
 * Mon Jan 25 2010 Tim Waugh <twaugh at redhat.com> - 1.1.16-13
 - Only add current device to list when all devices found (bug #558524).
 



More information about the scm-commits mailing list