- Handle errors more gracefully in userdefault.py (bug #556345).

This commit is contained in:
Tim Waugh 2010-01-18 17:03:23 +00:00
parent c6ceea4877
commit 42767d652c
3 changed files with 30 additions and 1 deletions

2
clog1
View File

@ -1,2 +1,2 @@
* Mon Jan 18 2010 Tim Waugh <twaugh@redhat.com> - 1.1.16-9
- Don't rely on cups-pk-helper being around (bug #556170).
- Handle errors more gracefully in userdefault.py (bug #556345).

View File

@ -0,0 +1,26 @@
diff -up system-config-printer-1.1.16/userdefault.py.userdefault-traceback system-config-printer-1.1.16/userdefault.py
--- system-config-printer-1.1.16/userdefault.py.userdefault-traceback 2009-09-01 12:08:33.000000000 +0100
+++ system-config-printer-1.1.16/userdefault.py 2010-01-18 16:58:17.502559206 +0000
@@ -1,7 +1,7 @@
#!/usr/bin/env python
-## Copyright (C) 2006, 2007, 2008 Red Hat, Inc.
-## Copyright (C) 2007, 2008 Tim Waugh <twaugh@redhat.com>
+## Copyright (C) 2006, 2007, 2008, 2010 Red Hat, Inc.
+## Author: Tim Waugh <twaugh@redhat.com>
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -161,7 +161,11 @@ class UserDefaultPrompt:
self.userdef.clear ()
self.set_default_fn (self.name)
else:
- self.userdef.set (self.name)
+ try:
+ self.userdef.set (self.name)
+ except Exception, e:
+ print "Error setting default: %s" % repr (e)
+
self.refresh_fn ()
dialog.destroy ()

View File

@ -28,6 +28,7 @@ Patch10: system-config-printer-auth-no-pw.patch
Patch11: system-config-printer-copy-crash.patch
Patch12: system-config-printer-check-still-connecting.patch
Patch13: system-config-printer-async-fallback.patch
Patch14: system-config-printer-userdefault-traceback.patch
Patch101: pycups-request-readio.patch
@ -102,6 +103,7 @@ printers.
%patch11 -p1 -b .copy-crash
%patch12 -p1 -b .check-still-connecting
%patch13 -p1 -b .async-fallback
%patch14 -p1 -b .userdefault-traceback
pushd pycups-%{pycups_version}
%patch101 -p1 -b .request-readio
@ -223,6 +225,7 @@ exit 0
%changelog
* Mon Jan 18 2010 Tim Waugh <twaugh@redhat.com> - 1.1.16-9
- Handle errors more gracefully in userdefault.py (bug #556345).
- Don't rely on cups-pk-helper being around (bug #556170).
- Avoid traceback when checking on connecting backends (bug #555552).