[hplip/f14] Catch DBusException in hp-systray (bug #746024).
Tim Waugh
twaugh at fedoraproject.org
Tue Oct 25 16:29:14 UTC 2011
commit 57c6df2fa94657d36b3fa90077aedea845234bf5
Author: Tim Waugh <twaugh at redhat.com>
Date: Tue Oct 25 16:05:28 2011 +0100
Catch DBusException in hp-systray (bug #746024).
hplip-systray-dbus-exception.patch | 18 ++++++++++++++++++
hplip.spec | 10 ++++++++--
2 files changed, 26 insertions(+), 2 deletions(-)
---
diff --git a/hplip-systray-dbus-exception.patch b/hplip-systray-dbus-exception.patch
new file mode 100644
index 0000000..007fb0f
--- /dev/null
+++ b/hplip-systray-dbus-exception.patch
@@ -0,0 +1,18 @@
+diff -up hplip-3.11.10/ui4/systemtray.py.dbus-exception hplip-3.11.10/ui4/systemtray.py
+--- hplip-3.11.10/ui4/systemtray.py.dbus-exception 2011-10-25 15:59:53.360181865 +0100
++++ hplip-3.11.10/ui4/systemtray.py 2011-10-25 16:03:55.294815114 +0100
+@@ -707,7 +707,13 @@ def run(read_pipe):
+ log.set_module("hp-systray(qt4)")
+ log.debug("PID=%d" % os.getpid())
+
+- app = SystemTrayApp(sys.argv, read_pipe)
++ try:
++ app = SystemTrayApp(sys.argv, read_pipe)
++ except DBusException, e:
++ # No session bus
++ log.debug("Caught exception: %s" % e)
++ sys.exit(1)
++
+ app.setQuitOnLastWindowClosed(False) # If not set, settings dlg closes app
+
+ i = 0
diff --git a/hplip.spec b/hplip.spec
index ee26278..72316d7 100644
--- a/hplip.spec
+++ b/hplip.spec
@@ -1,7 +1,7 @@
Summary: HP Linux Imaging and Printing Project
Name: hplip
Version: 3.11.10
-Release: 4%{?dist}
+Release: 5%{?dist}
License: GPLv2+ and MIT
Group: System Environment/Daemons
Conflicts: system-config-printer < 0.6.132
@@ -24,7 +24,7 @@ Patch9: hplip-snmp-quirks.patch
Patch10: hplip-discovery-method.patch
Patch11: hplip-hpijs-marker-supply.patch
Patch12: hplip-clear-old-state-reasons.patch
-
+Patch13: hplip-systray-dbus-exception.patch
Patch14: hplip-hpcups-sigpipe.patch
Patch15: hplip-fax-ppd.patch
Patch16: hplip-bad-low-ink-warning.patch
@@ -204,6 +204,9 @@ mv prnt/drv/hpijs.drv.in{,.deviceIDs-drv-hpijs}
# Clear old printer-state-reasons we used to manage (bug #510926).
%patch12 -p1 -b .clear-old-state-reasons
+# Catch DBusException in hp-systray (bug #746024).
+%patch13 -p1 -b .systray-dbus-exception
+
# Avoid busy loop in hpcups when backend has exited (bug #525944).
%patch14 -p1 -b .hpcups-sigpipe
@@ -520,6 +523,9 @@ fi
%postun libs -p /sbin/ldconfig
%changelog
+* Tue Oct 25 2011 Tim Waugh <twaugh at redhat.com> 3.11.10-5
+- Catch DBusException in hp-systray (bug #746024).
+
* Mon Oct 17 2011 Tim Waugh <twaugh at redhat.com> 3.11.10-4
- Corrected IEEE 1284 Device ID for LaserJet M1319f MFP (bug #746614)
More information about the scm-commits
mailing list