launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #24089
[Merge] ~cjwatson/launchpad:more-warning-handler-info into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:more-warning-handler-info into launchpad:master.
Commit message:
Fix incomplete messages from warning handler
The warning handler sometimes emitted messages like this (with local
paths shortened for brevity):
The method SimpleViewClass from .../lib/lp/bugs/browser/../templates/buglisting-default.pt._getBatchNavigator
The doctest <doctest xx-bug-subscriptions.txt[4]>, at the line:
>>> browser.getControl('Save these changes').click()
This is clearly incomplete. With this change, we instead get:
The method SimpleViewClass from .../lib/lp/bugs/browser/../templates/buglisting-default.pt._getBatchNavigator
The doctest <doctest xx-bug-subscriptions.txt[4]>, at the line:
>>> browser.getControl('Save these changes').click()
.../env/lib/python2.7/site-packages/lazr/batchnavigator/_batchnavigator.py:82: PendingDeprecationWarning: cgi.parse_qs is deprecated, use urlparse.parse_qs instead
return cgi.parse_qs(query_string, keep_blank_values=True)
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/374682
The previous messages were a bit "Shaka, when the walls fell".
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:more-warning-handler-info into launchpad:master.
diff --git a/lib/lp/scripts/utilities/warninghandler.py b/lib/lp/scripts/utilities/warninghandler.py
index 4a489d7..026f69e 100644
--- a/lib/lp/scripts/utilities/warninghandler.py
+++ b/lib/lp/scripts/utilities/warninghandler.py
@@ -22,7 +22,7 @@ class WarningReport:
def __str__(self):
info = str(self.info)
if info:
- return info
+ return '\n'.join((info, self.message))
else:
return self.message