From 3e7f8d1653421a673b3b80e0a2a467d3a5b85b10 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 13 Dec 2010 16:47:39 +0000 Subject: [PATCH] Catch D-Bus exceptions in fax dialog (bug #645316). --- hplip-dbus-exception.patch | 18 ++++++++++++++++++ hplip.spec | 9 ++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 hplip-dbus-exception.patch diff --git a/hplip-dbus-exception.patch b/hplip-dbus-exception.patch new file mode 100644 index 0000000..b32fc3d --- /dev/null +++ b/hplip-dbus-exception.patch @@ -0,0 +1,18 @@ +diff -up hplip-3.10.9/ui4/sendfaxdialog.py~ hplip-3.10.9/ui4/sendfaxdialog.py +--- hplip-3.10.9/ui4/sendfaxdialog.py~ 2010-09-26 18:07:19.000000000 +0100 ++++ hplip-3.10.9/ui4/sendfaxdialog.py 2010-12-13 16:44:56.857648866 +0000 +@@ -915,8 +915,12 @@ class SendFaxDialog(QDialog, Ui_Dialog): + def CheckTimer_timeout(self): + if not self.busy: + #log.debug("Checking for incoming faxes...") +- device_uri, printer_name, event_code, username, job_id, title, timedate, fax_file = \ +- self.service.CheckForWaitingFax(self.device_uri, prop.username, self.last_job_id) ++ try: ++ device_uri, printer_name, event_code, username, job_id, title, timedate, fax_file = \ ++ self.service.CheckForWaitingFax(self.device_uri, prop.username, self.last_job_id) ++ except Exception, e: ++ log.debug("Exception caught: %s" % e) ++ fax_file = None + + if fax_file: + self.last_job_id = 0 diff --git a/hplip.spec b/hplip.spec index 9d05f71..fb0924a 100644 --- a/hplip.spec +++ b/hplip.spec @@ -1,7 +1,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.10.9 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2+ and MIT Group: System Environment/Daemons Conflicts: system-config-printer < 0.6.132 @@ -43,6 +43,7 @@ Patch26: hplip-UnicodeDecodeError.patch Patch27: hplip-emit-SIGNAL.patch Patch28: hplip-fab-root-crash.patch Patch29: hplip-addprinter.patch +Patch30: hplip-dbus-exception.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -272,6 +273,9 @@ done # that we can get an authentication callback (bug #538352). %patch29 -p1 -b .addprinter +# Catch D-Bus exceptions in fax dialog (bug #645316). +%patch30 -p1 -b .dbus-exception + sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ prnt/drv/hpcups.drv.in @@ -498,6 +502,9 @@ fi %postun libs -p /sbin/ldconfig %changelog +* Mon Dec 13 2010 Tim Waugh - 3.10.9-9 +- Catch D-Bus exceptions in fax dialog (bug #645316). + * Fri Dec 03 2010 Jiri Popelka 3.10.9-8 - Corrected IEEE 1284 Device IDs: HP Color LaserJet CP2025dn (bug #651509).