1577078 - add other trap for missing gui
This commit is contained in:
parent
af2441501d
commit
349828da9c
@ -1,6 +1,12 @@
|
|||||||
diff -up hplip-3.16.7/base/utils.py.ui-optional hplip-3.16.7/base/utils.py
|
diff -up hplip-3.18.4/base/utils.py.ui-optional hplip-3.18.4/base/utils.py
|
||||||
--- hplip-3.16.7/base/utils.py.ui-optional 2016-07-15 12:12:28.000000000 +0200
|
--- hplip-3.18.4/base/utils.py.ui-optional 2018-04-25 12:34:16.000000000 +0200
|
||||||
+++ hplip-3.16.7/base/utils.py 2016-08-12 10:12:24.599398769 +0200
|
+++ hplip-3.18.4/base/utils.py 2018-04-26 09:27:26.487258888 +0200
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/env python
|
||||||
|
+#!/usr/bin/python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# (c) Copyright 2001-2015 HP Development Company, L.P.
|
||||||
@@ -733,6 +733,13 @@ def checkPyQtImport(): # qt3
|
@@ -733,6 +733,13 @@ def checkPyQtImport(): # qt3
|
||||||
if os.getenv('DISPLAY') and os.getenv('STARTED_FROM_MENU'):
|
if os.getenv('DISPLAY') and os.getenv('STARTED_FROM_MENU'):
|
||||||
no_qt_message_gtk()
|
no_qt_message_gtk()
|
||||||
@ -52,3 +58,19 @@ diff -up hplip-3.16.7/base/utils.py.ui-optional hplip-3.16.7/base/utils.py
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
diff -up hplip-3.18.4/plugin.py.ui-optional hplip-3.18.4/plugin.py
|
||||||
|
--- hplip-3.18.4/plugin.py.ui-optional 2018-05-11 10:06:02.925579534 +0200
|
||||||
|
+++ hplip-3.18.4/plugin.py 2018-05-11 10:25:08.576302069 +0200
|
||||||
|
@@ -252,7 +252,11 @@ if mode == GUI_MODE:
|
||||||
|
# clean_exit(1)
|
||||||
|
|
||||||
|
QApplication, ui_package = utils.import_dialog(ui_toolkit)
|
||||||
|
- ui = import_module(ui_package + ".plugindialog")
|
||||||
|
+ try:
|
||||||
|
+ ui = import_module(ui_package + ".plugindialog")
|
||||||
|
+ except ModuleNotFoundError:
|
||||||
|
+ log.error("hplip-gui not installed. GUI not available. Exiting.")
|
||||||
|
+ clean_exit(1)
|
||||||
|
if ui_toolkit == "qt5":
|
||||||
|
from PyQt5.QtWidgets import QMessageBox
|
||||||
|
elif ui_toolkit == "qt4":
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
Summary: HP Linux Imaging and Printing Project
|
Summary: HP Linux Imaging and Printing Project
|
||||||
Name: hplip
|
Name: hplip
|
||||||
Version: 3.18.4
|
Version: 3.18.4
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv2+ and MIT and BSD
|
License: GPLv2+ and MIT and BSD
|
||||||
|
|
||||||
Url: https://developers.hp.com/hp-linux-imaging-and-printing
|
Url: https://developers.hp.com/hp-linux-imaging-and-printing
|
||||||
@ -525,6 +525,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
|
|||||||
%postun libs -p /sbin/ldconfig
|
%postun libs -p /sbin/ldconfig
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri May 11 2018 Zdenek Dohnal <zdohnal@redhat.com> - 3.18.4-2
|
||||||
|
- 1577078 - add other trap for missing gui
|
||||||
|
|
||||||
* Thu Apr 26 2018 Zdenek Dohnal <zdohnal@redhat.com> - 3.18.4-1
|
* Thu Apr 26 2018 Zdenek Dohnal <zdohnal@redhat.com> - 3.18.4-1
|
||||||
- 3.18.4
|
- 3.18.4
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user