Bug 205938 - Stack trace in virt-manager if no DISPLAY variable set
Summary: Stack trace in virt-manager if no DISPLAY variable set
Alias: None
Product: Fedora
Classification: Fedora
Component: virt-manager
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Daniel Berrange
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2006-09-10 15:52 UTC by Chris Lalancette
Modified: 2007-11-30 22:11 UTC (History)
0 users

Clone Of:
Last Closed: 2006-09-12 23:25:15 UTC

Attachments (Terms of Use)

Description Chris Lalancette 2006-09-10 15:52:05 UTC
Description of problem:
If there is no DISPLAY variable set, virt-manager will throw the following stack

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 ?
  File "/usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line 78, in _init
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 23:25:15 UTC
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.