Merge lp:~adeuring/launchpad/bug-446600 into lp:launchpad

Proposed by Abel Deuring
Status: Merged
Merged at revision: not available
Proposed branch: lp:~adeuring/launchpad/bug-446600
Merge into: lp:launchpad
Diff against target: 25 lines
2 files modified
lib/canonical/launchpad/browser/hwdb.py (+1/-1)
lib/canonical/launchpad/pagetests/hwdb/01-submit-data.txt (+2/-0)
To merge this branch: bzr merge lp:~adeuring/launchpad/bug-446600
Reviewer Review Type Date Requested Status
Paul Hummer (community) Approve
Review via email: mp+13430@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Abel Deuring (adeuring) wrote :

This branch fixes bug 446600: "HWSubmissionMissingFields exceptions should be updated to be informational only"

The fix is quite simple: Diogo added in r9660 a method handling() to our ErrorReportingUtility, which allow to label logged OOPSes as being informational. So I changed the call error_utility.raising() to error_utlitiy.handling()

Test: ./bin/test -f canonical pagetests.hwdb

Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/canonical/launchpad/browser/hwdb.py
  lib/canonical/launchpad/pagetests/hwdb/01-submit-data.txt

Revision history for this message
Paul Hummer (rockstar) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/canonical/launchpad/browser/hwdb.py'
--- lib/canonical/launchpad/browser/hwdb.py 2009-09-18 20:25:59 +0000
+++ lib/canonical/launchpad/browser/hwdb.py 2009-10-15 16:40:31 +0000
@@ -57,7 +57,7 @@
57 info = (HWSubmissionMissingFields,57 info = (HWSubmissionMissingFields,
58 'Missing form fields: %s' % missing_fields, None)58 'Missing form fields: %s' % missing_fields, None)
59 errorUtility = getUtility(IErrorReportingUtility)59 errorUtility = getUtility(IErrorReportingUtility)
60 errorUtility.raising(info, self.request)60 errorUtility.handling(info, self.request)
61 self.addCustomHeader(61 self.addCustomHeader(
62 'Error: Required fields not contained in POST data: '62 'Error: Required fields not contained in POST data: '
63 + missing_fields)63 + missing_fields)
6464
=== modified file 'lib/canonical/launchpad/pagetests/hwdb/01-submit-data.txt'
--- lib/canonical/launchpad/pagetests/hwdb/01-submit-data.txt 2009-07-23 19:42:59 +0000
+++ lib/canonical/launchpad/pagetests/hwdb/01-submit-data.txt 2009-10-15 16:40:31 +0000
@@ -255,6 +255,8 @@
255 Date:...255 Date:...
256 Page-Id: HWDBApplication:+submit256 Page-Id: HWDBApplication:+submit
257 ...257 ...
258 Informational: True
259 ...
258 Traceback (most recent call last):260 Traceback (most recent call last):
259 HWSubmissionMissingFields: Missing form fields: distribution,261 HWSubmissionMissingFields: Missing form fields: distribution,
260 submission_data262 submission_data