Skip to content
Snippets Groups Projects
Commit 252412e24551 authored by Matt Mackall's avatar Matt Mackall
Browse files

hghave: use try/except/finally

parent c6427cd45760
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment