[system-config-printer/f20] Fix job retrieval (bug #1119222).
Tim Waugh
twaugh at fedoraproject.org
Mon Jul 14 10:17:42 UTC 2014
commit 885df8883b02ed40244d0498dadfd225da527676
Author: Tim Waugh <twaugh at redhat.com>
Date: Mon Jul 14 11:08:51 2014 +0100
Fix job retrieval (bug #1119222).
Resolves: rhbz#1119222
system-config-printer-retrieve.patch | 25 +++++++++++++++++++++++++
system-config-printer.spec | 9 ++++++++-
2 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/system-config-printer-retrieve.patch b/system-config-printer-retrieve.patch
new file mode 100644
index 0000000..b69fc17
--- /dev/null
+++ b/system-config-printer-retrieve.patch
@@ -0,0 +1,25 @@
+diff -up system-config-printer-1.4.5/jobviewer.py.retrieve system-config-printer-1.4.5/jobviewer.py
+--- system-config-printer-1.4.5/jobviewer.py.retrieve 2014-07-04 16:21:48.000000000 +0100
++++ system-config-printer-1.4.5/jobviewer.py 2014-07-14 11:04:27.392705510 +0100
+@@ -1424,14 +1424,19 @@ class JobViewer (GtkGUI):
+ host=self.host,
+ port=self.port,
+ encryption=self.encryption)
+- except RuntimeError:
++ except RuntimeError as e:
++ print e
+ return
+
+ for jobid in self.jobids:
+ try:
+ attrs=c.getJobAttributes(jobid)
+ printer_uri=attrs['job-printer-uri']
+- document_count=attrs.get ('document-count', 0)
++ try:
++ document_count = attrs['number-of-documents']
++ except KeyError:
++ document_count = attrs.get ('document-count', 0)
++
+ for document_number in range(1, document_count+1):
+ document=c.getDocument(printer_uri, jobid, document_number)
+ tempfile = document.get('file')
diff --git a/system-config-printer.spec b/system-config-printer.spec
index 9b136a2..ddedab6 100644
--- a/system-config-printer.spec
+++ b/system-config-printer.spec
@@ -1,13 +1,14 @@
Summary: A printer administration tool
Name: system-config-printer
Version: 1.4.5
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2+
URL: http://cyberelk.net/tim/software/system-config-printer/
Group: System Environment/Base
Source0: http://cyberelk.net/tim/data/system-config-printer/1.4/%{name}-%{version}.tar.xz
Patch1: system-config-printer-no-applet-in-gnome.patch
Patch2: system-config-printer-permission.patch
+Patch3: system-config-printer-retrieve.patch
BuildRequires: cups-devel >= 1.2
BuildRequires: desktop-file-utils >= 0.2.92
@@ -74,6 +75,9 @@ printers.
# Handle failure when cups-pk-helper not installed (bug #1118836).
%patch2 -p1 -b .permission
+# Fix job retrieval (bug #1119222).
+%patch3 -p1 -b .retrieve
+
sed -i.cflags-override -e '/^CFLAGS/d' Makefile.{am,in}
%build
@@ -174,6 +178,9 @@ touch %buildroot%{_localstatedir}/run/udev-configure-printer/usb-uris
exit 0
%changelog
+* Mon Jul 14 2014 Tim Waugh <twaugh at redhat.com> 1.4.5-3
+- Fix job retrieval (bug #1119222).
+
* Fri Jul 11 2014 Tim Waugh <twaugh at redhat.com> 1.4.5-2
- Handle failure when cups-pk-helper not installed (bug #1118836).
More information about the scm-commits
mailing list