[PATCH stable] bookmark: restore python 2.4 compatibility

Gilles Moris gilles.moris at free.fr
Wed Feb 29 08:35:23 UTC 2012


# HG changeset patch
# User Gilles Moris <gilles.moris at free.fr>
# Date 1330504459 -3600
# Branch stable
# Node ID 76aca2c7d10b1e83f7775b54f2194ae34a6a55a8
# Parent  7c75924a69266d58fcbe8a912c877daa440f7dc2
bookmark: restore python 2.4 compatibility

Remove py25 'try except finally' clause.

diff -r 7c75924a6926 -r 76aca2c7d10b mercurial/bookmarks.py
--- a/mercurial/bookmarks.py	Tue Feb 28 23:47:46 2012 +0200
+++ 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()
 



More information about the Mercurial-devel mailing list