Use items() instead of iteritems() with Python 3 dicts (bug #1151457).

Resolves: rhbz#1151457
This commit is contained in:
Tim Waugh 2014-10-10 17:21:56 +01:00
parent 5a973a6243
commit fe90f39d39
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,12 @@
diff -up system-config-printer-1.5.2/scp-dbus-service.py.python3 system-config-printer-1.5.2/scp-dbus-service.py
--- system-config-printer-1.5.2/scp-dbus-service.py.python3 2014-10-10 16:42:42.000000000 +0100
+++ system-config-printer-1.5.2/scp-dbus-service.py 2014-10-10 17:20:32.792518638 +0100
@@ -295,7 +295,7 @@ class GroupPhysicalDevicesRequest:
# (in self.devices) have been modified.
try:
self.physdevs = []
- for device_uri, deviceobj in self.deviceobjs.iteritems ():
+ for device_uri, deviceobj in self.deviceobjs.items ():
newphysicaldevice = PhysicalDevice.PhysicalDevice (deviceobj)
matched = False
try:

View File

@ -7,11 +7,12 @@
Summary: A printer administration tool Summary: A printer administration tool
Name: system-config-printer Name: system-config-printer
Version: 1.5.2 Version: 1.5.2
Release: 1%{?dist} Release: 2%{?dist}
License: GPLv2+ License: GPLv2+
URL: http://cyberelk.net/tim/software/system-config-printer/ URL: http://cyberelk.net/tim/software/system-config-printer/
Group: System Environment/Base Group: System Environment/Base
Source0: http://cyberelk.net/tim/data/system-config-printer/1.4/%{name}-%{version}.tar.xz Source0: http://cyberelk.net/tim/data/system-config-printer/1.4/%{name}-%{version}.tar.xz
Patch1: system-config-printer-python3.patch
BuildRequires: cups-devel >= 1.2 BuildRequires: cups-devel >= 1.2
BuildRequires: desktop-file-utils >= 0.2.92 BuildRequires: desktop-file-utils >= 0.2.92
@ -80,6 +81,9 @@ printers.
%prep %prep
%setup -q %setup -q
# Use items() instead of iteritems() with Python 3 dicts (bug #1151457).
%patch1 -p1 -b .python3
%build %build
%configure --with-udev-rules %configure --with-udev-rules
make %{?_smp_mflags} make %{?_smp_mflags}
@ -180,6 +184,9 @@ touch %buildroot%{_localstatedir}/run/udev-configure-printer/usb-uris
exit 0 exit 0
%changelog %changelog
* Fri Oct 10 2014 Tim Waugh <twaugh@redhat.com> - 1.5.2-2
- Use items() instead of iteritems() with Python 3 dicts (bug #1151457).
* Fri Oct 10 2014 Tim Waugh <twaugh@redhat.com> - 1.5.2-1 * Fri Oct 10 2014 Tim Waugh <twaugh@redhat.com> - 1.5.2-1
- 1.5.2. - 1.5.2.