lock: use util.unlink (issue2537)
authorAdrian Buehlmann <adrian@cadifra.com>
Tue, 11 Jan 2011 14:10:16 +0100
changeset 13281 95de08ffa324
parent 13280 6052bbc7aabd
child 13282 c01eea6c455b
lock: use util.unlink (issue2537)
mercurial/lock.py
--- a/mercurial/lock.py	Tue Jan 11 14:10:16 2011 +0100
+++ b/mercurial/lock.py	Tue Jan 11 14:10:16 2011 +0100
@@ -113,7 +113,7 @@
         # held, or can race and break valid lock.
         try:
             l = lock(self.f + '.break', timeout=0)
-            os.unlink(self.f)
+            util.unlink(self.f)
             l.release()
         except error.LockError:
             return locker
@@ -126,7 +126,7 @@
             if self.releasefn:
                 self.releasefn()
             try:
-                os.unlink(self.f)
+                util.unlink(self.f)
             except OSError:
                 pass