# HG changeset patch # User Ryan McElroy # Date 2017-03-21 13:50:28 # Node ID 8a32d635219603cc50071f385a9cead0ed82fb70 # Parent d5758760c0f4b48c891823e011b311f4a9f92324 bookmarks: use tryunlink diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py --- a/mercurial/bookmarks.py +++ b/mercurial/bookmarks.py @@ -131,11 +131,7 @@ class bmstore(dict): finally: f.close() else: - try: - self._repo.vfs.unlink('bookmarks.current') - except OSError as inst: - if inst.errno != errno.ENOENT: - raise + self._repo.vfs.tryunlink('bookmarks.current') self._aclean = True def _write(self, fp):