fix infinite loop in password dialog in hp-toolbox
This commit is contained in:
parent
a82459c176
commit
2b42a1175e
34
hplip-dialog-infinite-loop.patch
Normal file
34
hplip-dialog-infinite-loop.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py
|
||||||
|
index c23957a..48b248f 100644
|
||||||
|
--- a/ui5/devmgr5.py
|
||||||
|
+++ b/ui5/devmgr5.py
|
||||||
|
@@ -2247,7 +2247,7 @@ class PasswordDialog(QDialog):
|
||||||
|
self.prompt = prompt
|
||||||
|
|
||||||
|
Layout= QGridLayout(self)
|
||||||
|
- Layout.setMargin(11)
|
||||||
|
+ Layout.setContentsMargins(11, 11, 11, 11)
|
||||||
|
Layout.setSpacing(6)
|
||||||
|
|
||||||
|
self.PromptTextLabel = QLabel(self)
|
||||||
|
@@ -2300,14 +2300,15 @@ class PasswordDialog(QDialog):
|
||||||
|
# XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||||
|
|
||||||
|
def showPasswordUI(prompt):
|
||||||
|
+ dlg = None
|
||||||
|
+
|
||||||
|
try:
|
||||||
|
dlg = PasswordDialog(prompt, None)
|
||||||
|
+ except Exception as e:
|
||||||
|
+ log.error('Unable to open password dialog due following error:\n {}'.format(e))
|
||||||
|
|
||||||
|
- if dlg.exec_() == QDialog.Accepted:
|
||||||
|
- return (dlg.getUsername(), dlg.getPassword())
|
||||||
|
-
|
||||||
|
- finally:
|
||||||
|
- pass
|
||||||
|
+ if dlg and dlg.exec_() == QDialog.Accepted:
|
||||||
|
+ return (dlg.getUsername(), dlg.getPassword())
|
||||||
|
|
||||||
|
return ("", "")
|
||||||
|
|
11
hplip.spec
11
hplip.spec
@ -7,7 +7,7 @@
|
|||||||
Summary: HP Linux Imaging and Printing Project
|
Summary: HP Linux Imaging and Printing Project
|
||||||
Name: hplip
|
Name: hplip
|
||||||
Version: 3.20.5
|
Version: 3.20.5
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv2+ and MIT and BSD and IJG and Public Domain and GPLv2+ with exceptions and ISC
|
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
|
Url: https://developers.hp.com/hp-linux-imaging-and-printing
|
||||||
@ -133,6 +133,11 @@ Patch51: hplip-fix-Wreturn-type-warning.patch
|
|||||||
# CFLAGS
|
# CFLAGS
|
||||||
# https://bugs.launchpad.net/hplip/+bug/1879445
|
# https://bugs.launchpad.net/hplip/+bug/1879445
|
||||||
Patch52: hplip-configure-python.patch
|
Patch52: hplip-configure-python.patch
|
||||||
|
# taken from hplip upstream report - toolbox uses deprecated method
|
||||||
|
# setMargin(), which generates an exception, resulting in a infinite loop
|
||||||
|
# of request on cupsd
|
||||||
|
# https://bugs.launchpad.net/hplip/+bug/1880275
|
||||||
|
Patch53: hplip-dialog-infinite-loop.patch
|
||||||
|
|
||||||
|
|
||||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||||
@ -396,6 +401,7 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h
|
|||||||
%patch50 -p1 -b .unicodeerror
|
%patch50 -p1 -b .unicodeerror
|
||||||
%patch51 -p1 -b .Wreturn-fix
|
%patch51 -p1 -b .Wreturn-fix
|
||||||
%patch52 -p1 -b .configure-python
|
%patch52 -p1 -b .configure-python
|
||||||
|
%patch53 -p1 -b .dialog-infinite-loop
|
||||||
|
|
||||||
sed -i.duplex-constraints \
|
sed -i.duplex-constraints \
|
||||||
-e 's,\(UIConstraints.* \*Duplex\),//\1,' \
|
-e 's,\(UIConstraints.* \*Duplex\),//\1,' \
|
||||||
@ -696,6 +702,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
|
|||||||
%config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio
|
%config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon May 25 2020 Zdenek Dohnal <zdohnal@redhat.com> - 3.20.5-2
|
||||||
|
- fix infinite loop in password dialog in hp-toolbox
|
||||||
|
|
||||||
* Thu May 14 2020 Zdenek Dohnal <zdohnal@redhat.com> - 3.20.5-1
|
* Thu May 14 2020 Zdenek Dohnal <zdohnal@redhat.com> - 3.20.5-1
|
||||||
- 3.20.5
|
- 3.20.5
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user