mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-23 17:34:21 +03:00
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:
parent
465b04ea18
commit
2f0e730efc
@ -102,7 +102,10 @@ class vmmErrorDialog(vmmGObject):
|
|||||||
if debug:
|
if debug:
|
||||||
debugmsg = "error dialog message:\nsummary=%s" % summary
|
debugmsg = "error dialog message:\nsummary=%s" % summary
|
||||||
if details and details != 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)
|
logging.debug(debugmsg)
|
||||||
|
|
||||||
# Make sure we have consistent details for error dialogs
|
# Make sure we have consistent details for error dialogs
|
||||||
|
Loading…
Reference in New Issue
Block a user