Bug 205938 - Stack trace in virt-manager if no DISPLAY variable set
Stack trace in virt-manager if no DISPLAY variable set
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: virt-manager (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Berrange
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-10 11:52 EDT by Chris Lalancette
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-09-12 19:25:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Chris Lalancette 2006-09-10 11:52:05 EDT
Description of problem:
If there is no DISPLAY variable set, virt-manager will throw the following stack
trace:

Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-manager.py", line 35, in ?
    import gtk
  File "/usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line 90, in ?
   _init()
  File "/usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line 78, in _init
    _gtk.init_check()
RuntimeError: could not open display

It should probably catch this error and display some sort of error messageg
instead of the stack trace.
Comment 1 Daniel Berrange 2006-09-12 19:25:15 EDT
The Python GTK bindings don't provide any easy way to trap & handle the error of
missing display, since they try to connect the moment you import the gtk module.
We could trap any errors occuring during import, but that would be catching much
more than we want - so while we'd improve clarity of the the missing $DISPLAY
use case, we'd make other errors much harder to debug. Since the stack trace
does end with a fairly clear description of the problem I don't thing its worth
trying to get any cleverer handling this.

Note You need to log in before you can comment on or make changes to this bug.