Fix job retrieval (bug #1119222).

Resolves: rhbz#1119222
This commit is contained in:
Tim Waugh 2014-07-14 11:08:51 +01:00
parent e429fbbe82
commit 885df8883b
2 changed files with 33 additions and 1 deletions

View File

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

View File

@ -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@redhat.com> 1.4.5-3
- Fix job retrieval (bug #1119222).
* Fri Jul 11 2014 Tim Waugh <twaugh@redhat.com> 1.4.5-2
- Handle failure when cups-pk-helper not installed (bug #1118836).