error: Don't double log summary

details is often composed of a summary + traceback, so if users copy
it into a bug report we get all the info. But when logging the contents
we don't want to double log the summary, so try to strip it out
This commit is contained in:
Cole Robinson 2018-03-16 17:30:39 -04:00
parent 465b04ea18
commit 2f0e730efc

View File

@ -102,7 +102,10 @@ class vmmErrorDialog(vmmGObject):
if debug:
debugmsg = "error dialog message:\nsummary=%s" % summary
if details and details != summary:
debugmsg += "\ndetails=%s" % details
det = details
if details.startswith(summary):
det = details[len(summary):].strip()
debugmsg += "\ndetails=%s" % det
logging.debug(debugmsg)
# Make sure we have consistent details for error dialogs