Commit 7c471a14 authored by Jason R. Coombs's avatar Jason R. Coombs

Use context manager for brevity

parent 0f7f8d71
......@@ -70,11 +70,8 @@ if PY3:
globs = globals()
if locs is None:
locs = globs
f = open(fn, 'rb')
try:
with open(fn, 'rb') as f:
source = f.read()
finally:
f.close()
exec(compile(source, fn, 'exec'), globs, locs)
def reraise(tp, value, tb=None):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment