From 2c86eefa5bcbd9bc6f6ed32d91be7474917f5910 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Sat, 29 Aug 2020 11:54:40 -0400 Subject: [PATCH] virt-manager: Drop the DISPLAY error handling Gtk nowadays doesn't raise an exception, it just exits directly Signed-off-by: Cole Robinson --- virtManager/virtmanager.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/virtManager/virtmanager.py b/virtManager/virtmanager.py index ce1291ce5..5a52d9996 100755 --- a/virtManager/virtmanager.py +++ b/virtManager/virtmanager.py @@ -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