Mercurial > hg-stable
changeset 25090:252412e24551
hghave: use try/except/finally
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 15 May 2015 10:29:39 -0500 |
parents | c6427cd45760 |
children | b5052fc73300 |
files | tests/hghave.py |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/hghave.py Fri May 15 10:00:46 2015 -0500 +++ b/tests/hghave.py Fri May 15 10:29:39 2015 -0500 @@ -225,12 +225,11 @@ os.close(fh) name = tempfile.mktemp(dir='.', prefix=tempprefix) try: - try: - util.oslink(fn, name) - os.unlink(name) - return True - except OSError: - return False + util.oslink(fn, name) + os.unlink(name) + return True + except OSError: + return False finally: os.unlink(fn)