Mercurial > hg
changeset 9685:a820cd39d415
lock: catch specific exceptions
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sat, 31 Oct 2009 18:10:52 +0100 |
parents | 618af2034ca6 |
children | ddf2adf88b89 |
files | mercurial/lock.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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: