mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-10-26 17:25:22 +03:00
virt-manager: Drop the DISPLAY error handling
Gtk nowadays doesn't raise an exception, it just exits directly Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
c8ed6534e5
commit
2c86eefa5b
@ -74,17 +74,6 @@ def _import_gtk(leftovers):
|
||||
# This ensures we can init gsettings correctly
|
||||
from . import config
|
||||
ignore = config
|
||||
except Exception as e: # pragma: no cover
|
||||
# Don't just let the exception raise here. abrt reports bugs
|
||||
# when users mess up su/sudo and DISPLAY isn't set. Printing
|
||||
# it avoids the issue
|
||||
display = os.environ.get("DISPLAY", "")
|
||||
msg = str(e)
|
||||
if display:
|
||||
msg += ": Could not open display: %s" % display
|
||||
log.debug("".join(traceback.format_exc()))
|
||||
print(msg)
|
||||
sys.exit(1)
|
||||
finally:
|
||||
sys.argv = origargv
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user