bookmarks: restore python 2.4 compatibility stable
authorGilles Moris <gilles.moris@free.fr>
Wed, 29 Feb 2012 09:34:19 +0100
branchstable
changeset 16194 6ba530122d8b
parent 16193 b468cea3f29d
child 16195 40cc20042fb4
bookmarks: restore python 2.4 compatibility Remove py25 'try except finally' clause.
mercurial/bookmarks.py
--- a/mercurial/bookmarks.py	Wed Feb 29 17:43:03 2012 +0000
+++ b/mercurial/bookmarks.py	Wed Feb 29 09:34:19 2012 +0100
@@ -129,11 +129,12 @@
 def unsetcurrent(repo):
     wlock = repo.wlock()
     try:
-        util.unlink(repo.join('bookmarks.current'))
-        repo._bookmarkcurrent = None
-    except OSError, inst:
-        if inst.errno != errno.ENOENT:
-            raise
+        try:
+            util.unlink(repo.join('bookmarks.current'))
+            repo._bookmarkcurrent = None
+        except OSError, inst:
+            if inst.errno != errno.ENOENT:
+                raise
     finally:
         wlock.release()