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

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-09-12 23:25:15 UTC
Type: ---
Embargoed:


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
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 Berrangé 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.