# HG changeset patch # User Matt Mackall # Date 1431701747 18000 # Node ID 7642f119c2a284fd6e7ee6f9e8fb7bc994ad9fce # Parent 68f456f2f425f3699c5318552eb6e04c239e4228 bookmarks: use try/except/finally diff -r 68f456f2f425 -r 7642f119c2a2 mercurial/bookmarks.py --- a/mercurial/bookmarks.py Fri May 15 09:55:31 2015 -0500 +++ b/mercurial/bookmarks.py Fri May 15 09:55:47 2015 -0500 @@ -156,12 +156,11 @@ """ wlock = repo.wlock() try: - try: - repo.vfs.unlink('bookmarks.current') - repo._activebookmark = None - except OSError, inst: - if inst.errno != errno.ENOENT: - raise + repo.vfs.unlink('bookmarks.current') + repo._activebookmark = None + except OSError, inst: + if inst.errno != errno.ENOENT: + raise finally: wlock.release()