1645815 - hp-check --runtime crashes involving FileNotFoundError

This commit is contained in:
Zdenek Dohnal 2018-11-12 16:47:43 +01:00
parent 18c9d2a97e
commit dd532c01aa
2 changed files with 24 additions and 1 deletions

12
hplip-stopiteration.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up hplip-3.18.6/base/utils.py.stopiteration hplip-3.18.6/base/utils.py
--- hplip-3.18.6/base/utils.py.stopiteration 2018-11-12 16:27:25.938082056 +0100
+++ hplip-3.18.6/base/utils.py 2018-11-12 16:28:02.678793293 +0100
@@ -265,7 +265,7 @@ def walkFiles(root, recurse=True, abs_pa
try:
names = os.listdir(root)
except os.error:
- raise StopIteration
+ return
pattern = pattern or '*'
pat_list = pattern.split(';')

View File

@ -7,7 +7,7 @@
Summary: HP Linux Imaging and Printing Project
Name: hplip
Version: 3.18.6
Release: 9%{?dist}
Release: 10%{?dist}
License: GPLv2+ and MIT and BSD and IJG and Public Domain and GPLv2+ with exceptions and ISC
Url: https://developers.hp.com/hp-linux-imaging-and-printing
@ -53,6 +53,11 @@ Patch33: hplip-error-print.patch
Patch34: hplip-hpfax-importerror-print.patch
Patch35: hplip-wifisetup.patch
Patch36: hplip-qmsgbox-typos.patch
# bz1645815, hplaunchpad1802941 - python3.7 treats StopIteration in generators
# differently than before, now it gets propagated as other exceptions and
# it cannot silently end the loop (as it was sometimes used) - use 'return'
# instead of raising StopIteration exception
Patch37: hplip-stopiteration.patch
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: python3-pillow
@ -278,6 +283,9 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h
# this patch fixes more of those typos
%patch36 -p1 -b .qmsgbox-typos-fix
# 1645815 - hp-check --runtime crashes involving FileNotFoundError
%patch37 -p1 -b .stopiteration
sed -i.duplex-constraints \
-e 's,\(UIConstraints.* \*Duplex\),//\1,' \
prnt/drv/hpcups.drv.in
@ -563,6 +571,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
%config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio
%changelog
* Mon Nov 12 2018 Zdenek Dohnal <zdohnal@redhat.com> - 3.18.6-10
- 1645815 - hp-check --runtime crashes involving FileNotFoundError
* Mon Oct 01 2018 Tomas Korbar <tkorbar@redhat.com> - 3.18.6-9
- 1594602 - Fix typos in QMessageBox constructor calls