virt-manager: Don't double log uncaught startup exception

This commit is contained in:
Cole Robinson 2013-04-14 13:24:02 -04:00
parent 079835bfaf
commit a0e07c0f92
1 changed files with 3 additions and 2 deletions

View File

@ -50,6 +50,8 @@ logging_setup = False
def _show_startup_error(msg, details):
if logging_setup:
logging.exception("Error starting virt-manager")
from virtManager.error import vmmErrorDialog
err = vmmErrorDialog()
title = _("Error starting Virtual Machine Manager")
@ -255,6 +257,7 @@ def main():
print "".join(traceback.format_exc())
return 1
globals()["Gtk"] = Gtk
# Need to parse CLI after import gtk, since gtk strips --sync
(options, ignore) = parse_commandline()
@ -366,8 +369,6 @@ if __name__ == "__main__":
except SystemExit:
raise
except Exception, run_e:
if logging_setup:
logging.exception(run_e)
if "Gtk" not in globals():
raise
_show_startup_error(str(run_e), "".join(traceback.format_exc()))