From 42767d652c48726415b060e8775e94533b9b4af2 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 18 Jan 2010 17:03:23 +0000 Subject: [PATCH] - Handle errors more gracefully in userdefault.py (bug #556345). --- clog1 | 2 +- ...config-printer-userdefault-traceback.patch | 26 +++++++++++++++++++ system-config-printer.spec | 3 +++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 system-config-printer-userdefault-traceback.patch diff --git a/clog1 b/clog1 index 53601e3..68855c2 100644 --- a/clog1 +++ b/clog1 @@ -1,2 +1,2 @@ * Mon Jan 18 2010 Tim Waugh - 1.1.16-9 -- Don't rely on cups-pk-helper being around (bug #556170). +- Handle errors more gracefully in userdefault.py (bug #556345). diff --git a/system-config-printer-userdefault-traceback.patch b/system-config-printer-userdefault-traceback.patch new file mode 100644 index 0000000..5afe283 --- /dev/null +++ b/system-config-printer-userdefault-traceback.patch @@ -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 ++## Copyright (C) 2006, 2007, 2008, 2010 Red Hat, Inc. ++## Author: Tim Waugh + + ## 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 () diff --git a/system-config-printer.spec b/system-config-printer.spec index 4cceebc..8033c82 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -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 - 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).