Merge lp:~jml/launchpad/show-warnings-once into lp:launchpad
| Status: | Merged |
|---|---|
| Merged at revision: | 11308 |
| Proposed branch: | lp:~jml/launchpad/show-warnings-once |
| Merge into: | lp:launchpad |
| Diff against target: |
32 lines (+6/-3) 1 file modified
lib/lp/scripts/utilities/warninghandler.py (+6/-3) |
| To merge this branch: | bzr merge lp:~jml/launchpad/show-warnings-once |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Jelmer Vernooij (community) | code | 2010-08-05 | Approve on 2010-08-05 |
|
Review via email:
|
|||
Commit Message
Only show warnings once at the end of a test run.
Description of the Change
It turns out that we blat all over Python's normal warning filtering and show every instance of every warning. This sucks *and* blows at the same time, so I've cobbled together a crappy little hack to fix it.
It's pretty hard to verify that this hack works, so I'm running the branch through ec2 test now.
| Robert Collins (lifeless) wrote : | # |
| Jelmer Vernooij (jelmer) wrote : | # |
Because the warnings include repr()'s this doesn't help in a lot of situations, e.g.:
/var/launchpad/
package_upload)
/var/launchpad/
package_upload)
I guess we should make sure to improve our __repr__ methods to fix more of these.
Either way, it's better than using a list. Should it perhaps be sorted so we see the warnings grouped per file, line?

If it works, rs=me