Merge lp:~stub/launchpad/trivial into lp:launchpad

Proposed by Stuart Bishop on 2010-09-09
Status: Merged
Approved by: Stuart Bishop on 2010-09-09
Approved revision: 9925
Merged at revision: 11518
Proposed branch: lp:~stub/launchpad/trivial
Merge into: lp:launchpad
Diff against target: 13 lines (+0/-4)
1 file modified
lib/canonical/launchpad/scripts/oops.py (+0/-4)
To merge this branch: bzr merge lp:~stub/launchpad/trivial
Reviewer Review Type Date Requested Status
Michael Nelson (community) code 2010-09-09 Approve on 2010-09-09
Review via email: mp+34948@code.launchpad.net

Commit Message

Remove unnecessary assert breaking oops-prune

Description of the Change

oops-prune is currently not working as an assert is being triggered.

The assert seems useless except to warn us that the PostgreSQL regular expression could be more efficient, as it is matching rows that our Python code does not mark up as OOPSes. This is fragile and unnecessary.

To post a comment you must log in.
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/launchpad/scripts/oops.py'
2--- lib/canonical/launchpad/scripts/oops.py 2010-08-20 20:31:18 +0000
3+++ lib/canonical/launchpad/scripts/oops.py 2010-09-09 06:09:15 +0000
4@@ -68,10 +68,6 @@
5 if match.group('oops') is not None:
6 code_string = match.group('oopscode')
7 referenced_codes.add(code_string.upper())
8- found = True
9- assert found, \
10- 'PostgreSQL regexp matched content that Python regexp ' \
11- 'did not (%r)' % (content,)
12
13 return referenced_codes
14