Code review comment for lp:~spiv/bzr/cleanup-hof

Revision history for this message
Andrew Bennetts (spiv) wrote :

Martin Pool wrote:
[...]
> > So, it appears we would get excellent mileage out of changing unlock on the core
> > objects (Branch, WorkingTree, etc) to suppress at least most errors, although
> > probably we still want to allow LockNotHeld and maybe LockBroken to raise, not
> > just warn?
>
> That sounds good. We could even consider not treating LockNotHeld etc
> differently to start with, people are unlikely to try to catch them.

I'm pretty sure tests do, though.

I'm currently experimenting with a decorator that looks like this:

    @only_raises(errors.LockNotHeld, errors.LockBroken)
    def unlock(self):

And so far it's looking promising, although there's still a little bit of test
suite fall out...

« Back to merge proposal