From 86d8fc7d0c246bef2298837bae2f23b7f628c711 Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Sun, 24 Oct 2010 20:32:39 +0200 Subject: [PATCH] Avoid UnicodeDecodeError in printsettingstoolbox.py (bug #645739). --- hplip-UnicodeDecodeError.patch | 12 ++++++++++++ hplip.spec | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 hplip-UnicodeDecodeError.patch diff --git a/hplip-UnicodeDecodeError.patch b/hplip-UnicodeDecodeError.patch new file mode 100644 index 0000000..6bdd9dc --- /dev/null +++ b/hplip-UnicodeDecodeError.patch @@ -0,0 +1,12 @@ +diff -up hplip-3.10.9/ui4/printsettingstoolbox.py.UnicodeDecodeError hplip-3.10.9/ui4/printsettingstoolbox.py +--- hplip-3.10.9/ui4/printsettingstoolbox.py.UnicodeDecodeError 2010-09-26 19:07:19.000000000 +0200 ++++ hplip-3.10.9/ui4/printsettingstoolbox.py 2010-10-22 15:01:13.000000000 +0200 +@@ -459,7 +459,7 @@ class PrintSettingsToolbox(QToolBox): + + self.beginControlGroup(g, QString(text)) + +- log.debug(" Text: %s" % unicode(text)) ++ log.debug(" Text: %s" % repr(text)) + log.debug("Num subgroups: %d" % num_subgroups) + + options = cups.getOptionList(g) diff --git a/hplip.spec b/hplip.spec index d3c46c8..4c12e6b 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: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ and MIT Group: System Environment/Daemons Conflicts: system-config-printer < 0.6.132 @@ -39,6 +39,7 @@ Patch22: hplip-ppd-ImageableArea.patch Patch23: hplip-network-timeout.patch Patch24: hplip-addgroup.patch Patch25: hplip-raw_deviceID-traceback.patch +Patch26: hplip-UnicodeDecodeError.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -242,6 +243,9 @@ done # Fixed traceback on error condition in device.py (bug #628125). %patch25 -p1 -b .raw_deviceID-traceback +# Avoid UnicodeDecodeError in printsettingstoolbox.py (bug #645739). +%patch26 -p1 -b .UnicodeDecodeError + sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ prnt/drv/hpcups.drv.in @@ -468,6 +472,9 @@ fi %postun libs -p /sbin/ldconfig %changelog +* Sun Oct 24 2010 Jiri Popelka +- Avoid UnicodeDecodeError in printsettingstoolbox.py (bug #645739). + * Mon Oct 18 2010 Tim Waugh - 3.10.9-3 - Fixed traceback on error condition in device.py (bug #628125). - Fixed bogus low ink warnings from hpijs driver (bug #643643).