Merge lp:~jelmer/brz/ignorefilterwarning into lp:brz

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/ignorefilterwarning
Merge into: lp:brz
Diff against target: 13 lines (+4/-1)
1 file modified
breezy/symbol_versioning.py (+4/-1)
To merge this branch: bzr merge lp:~jelmer/brz/ignorefilterwarning
Reviewer Review Type Date Requested Status
Martin Packman Approve
Review via email: mp+360969@code.launchpad.net

Commit message

Don't throw an incomprehensible traceback when a warning filter has already been removed.

Description of the change

Don't throw an incomprehensible traceback when a warning filter has already been removed.

I'm not entirely sure about this one; perhaps we should just not do any filtering of warnings in the code?

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote :

I think this is actually reasonable, cleanup() should try to not throw things, only edgy bit is depending on the exception type raised by the remove() but seems fine.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'breezy/symbol_versioning.py'
--- breezy/symbol_versioning.py 2018-11-17 16:53:10 +0000
+++ breezy/symbol_versioning.py 2018-12-15 17:02:59 +0000
@@ -317,7 +317,10 @@
317 """317 """
318 def cleanup():318 def cleanup():
319 if filter:319 if filter:
320 warnings.filters.remove(filter)320 try:
321 warnings.filters.remove(filter)
322 except IndexError:
323 pass
321 return cleanup324 return cleanup
322325
323326

Subscribers

People subscribed via source and target branches