summaryrefslogtreecommitdiff
path: root/virtManager/error.py
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2018-03-16 17:30:39 -0400
committerCole Robinson <crobinso@redhat.com>2018-03-16 17:30:39 -0400
commit2f0e730efc76372f2d8e6fdb37c23c868379c406 (patch)
treed2435eb318214cd6aed913d8a2575f2057598096 /virtManager/error.py
parent465b04ea18616ce1d263520fcbb22c2633447bd4 (diff)
downloadvirt-manager-2f0e730efc76372f2d8e6fdb37c23c868379c406.tar.gz
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
Diffstat (limited to 'virtManager/error.py')
-rw-r--r--virtManager/error.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/virtManager/error.py b/virtManager/error.py
index 99624234..030dd9d6 100644
--- a/virtManager/error.py
+++ b/virtManager/error.py
@@ -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