Mercurial > hg
changeset 25081:7642f119c2a2
bookmarks: use try/except/finally
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 15 May 2015 09:55:47 -0500 |
parents | 68f456f2f425 |
children | e30b66bb7d4d |
files | mercurial/bookmarks.py |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
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()