can't run hp-check without GUI

Bug #1070758 reported by Jiri Popelka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned

Bug Description

Running hp-check without a GUI results in:

:Traceback (most recent call last):
: File "/bin/hp-check", line 476, in <module>
: core.init()
: File "/usr/share/hplip/installer/core_install.py", line 424, in init
: self.check_dependencies(callback)
: File "/usr/share/hplip/installer/core_install.py", line 517, in check_dependencies
: self.have_dependencies[d] = self.dependencies[d][3]()
: File "/usr/share/hplip/installer/core_install.py", line 1023, in check_pynotify
: import pynotify
: File "/usr/lib/python2.7/site-packages/gtk-2.0/pynotify/__init__.py", line 19, in <module>
: import gtk
: File "/usr/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py", line 64, in <module>
: _init()
: File "/usr/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py", line 52, in _init
: _gtk.init_check()
:RuntimeError: could not open display

Revision history for this message
Jiri Popelka (jpopelka) wrote :
Revision history for this message
Amarnath Chitumalla (amarnath-chitumalla) wrote :

Hi Jiri Popelka,

Thank you for providing the patch.

We modified the patch to as follows:-

@@ -1021,7 +1021,1 @@ class CoreInstall(object):
             import pynotify
- except ImportError:
+ except ImportError, RuntimeError:
             return False
         return True

Thanks & Regards,
Amarnath

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.