error: Don't log redundant details bits

This commit is contained in:
Cole Robinson 2014-04-16 12:12:07 -04:00
parent 6288135f2b
commit 341a453d28

View File

@ -73,14 +73,16 @@ class vmmErrorDialog(vmmGObject):
if tb != "None": if tb != "None":
details += "\n\n" + tb details += "\n\n" + tb
if debug:
debugmsg = "error dialog message:\nsummary=%s" % summary
if details and details != summary:
debugmsg += "\ndetails=%s" % details
logging.debug(debugmsg)
# Make sure we have consistent details for error dialogs # Make sure we have consistent details for error dialogs
if (dialog_type == Gtk.MessageType.ERROR and not summary in details): if (dialog_type == Gtk.MessageType.ERROR and not summary in details):
details = summary + "\n\n" + details details = summary + "\n\n" + details
if debug:
logging.debug("error dialog message:\nsummary=%s\ndetails=%s",
summary, details)
dialog = _errorDialog(parent=self.get_parent(), dialog = _errorDialog(parent=self.get_parent(),
flags=0, flags=0,
message_type=dialog_type, message_type=dialog_type,