mercurial/lock.py
changeset 17683 6d7db5794e8c
parent 17537 31f32a96e1e3
parent 17682 829919ef894a
child 18907 af9fa8d4c939
--- a/mercurial/lock.py	Sat Sep 29 11:57:16 2012 -0500
+++ b/mercurial/lock.py	Sat Sep 29 12:28:52 2012 -0500
@@ -97,7 +97,12 @@
         The lock file is only deleted when None is returned.
 
         """
-        locker = util.readlock(self.f)
+        try:
+            locker = util.readlock(self.f)
+        except OSError, why:
+            if why.errno == errno.ENOENT:
+                return None
+            raise
         try:
             host, pid = locker.split(":", 1)
         except ValueError: