Mercurial > hg
diff mercurial/bookmarks.py @ 25081:7642f119c2a2
bookmarks: use try/except/finally
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 15 May 2015 09:55:47 -0500 |
parents | fb9b7b937b3e |
children | d6e7ac651973 |
line wrap: on
line diff
--- 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()