Catch DBusException in hp-systray (bug #746024).

This commit is contained in:
Tim Waugh 2011-10-25 16:05:28 +01:00
parent 44430bd329
commit 57c6df2fa9
2 changed files with 26 additions and 2 deletions

View File

@ -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

View File

@ -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@redhat.com> 3.11.10-5
- Catch DBusException in hp-systray (bug #746024).
* Mon Oct 17 2011 Tim Waugh <twaugh@redhat.com> 3.11.10-4
- Corrected IEEE 1284 Device ID for LaserJet M1319f MFP (bug #746614)