mercurial/bookmarks.py
changeset 31550 8a32d6352196
parent 31072 0332b8fafd05
child 32420 b9942bc6b292
--- a/mercurial/bookmarks.py	Tue Mar 21 06:50:28 2017 -0700
+++ b/mercurial/bookmarks.py	Tue Mar 21 06:50:28 2017 -0700
@@ -131,11 +131,7 @@
                 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):