# HG changeset patch # User Benoit Boissinot # Date 1257009052 -3600 # Node ID a820cd39d41549434e3a74dde3fa3df8d2802cf0 # Parent 618af2034ca6ad47d0c2d8b1808eb76d9764f450 lock: catch specific exceptions diff -r 618af2034ca6 -r a820cd39d415 mercurial/lock.py --- 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: