[MERGE][bug #125784] Don't suppress original errors when .unlock() fails

John Arbash Meinel john at arbash-meinel.com
Sun Jun 8 18:02:33 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The attached patch in Andrew's work to clean up the lock decorators to raise the
original exception.

While probing around there, it seemed like we didn't actually ever test that the
decorators did what we expect (lock, call the func, and then unlock), even
though there was a logging object already set up to do so. We also weren't
testing that they returned the original functions result, just that they were
accepting parameters. But we weren't testing all combinations of them.

This exposed a small problem in his work, which is that he "fixed" the write
lock, but not the read lock. It also exposed a bug in how he changed the
_pretty_needs_write_lock.

As they say, untested code is broken code...

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhMEKkACgkQJdeBCYSNAAOFAQCfflfJi+k1wLdsepNqGhvX1AVw
2AMAn1oWkEWy9TRP8d4IwkuuuvZ9A60a
=Fom/
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: safer-lock-decorator.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20080608/e6d1cddd/attachment.diff 


More information about the bazaar mailing list