mercurial/lock.py
changeset 9685 a820cd39d415
parent 9680 8cea86d73887
child 9858 ea38a2c1bdd3
--- a/mercurial/lock.py	Sat Oct 31 18:02:34 2009 +0100
+++ b/mercurial/lock.py	Sat Oct 31 18:10:52 2009 +0100
@@ -105,7 +105,7 @@
             return locker
         try:
             pid = int(pid)
-        except:
+        except ValueError:
             return locker
         if util.testpid(pid):
             return locker
@@ -128,7 +128,8 @@
                 self.releasefn()
             try:
                 os.unlink(self.f)
-            except: pass
+            except OSError:
+                pass
 
 def release(*locks):
     for lock in locks: