Commit 859f2a78 authored by Tom Niget's avatar Tom Niget

Close files

parent 9e4d056b
...@@ -83,7 +83,8 @@ if args.duration: ...@@ -83,7 +83,8 @@ if args.duration:
signal.signal(signal.SIGALRM, handler) signal.signal(signal.SIGALRM, handler)
signal.alarm(args.duration) signal.alarm(args.duration)
exec(compile(open("fixnemu.py", "rb").read(), "fixnemu.py", 'exec')) with open('fixnemu.py', 'rb') as f:
exec(compile(f.read(), 'fixnemu.py', 'exec'))
class Re6stNode(nemu.Node): class Re6stNode(nemu.Node):
......
...@@ -30,4 +30,5 @@ def __file__(): ...@@ -30,4 +30,5 @@ def __file__():
return os.path.join(sys.path[0], sys.argv[1]) return os.path.join(sys.path[0], sys.argv[1])
__file__ = __file__() __file__ = __file__()
exec(compile(open(__file__, "rb").read(), __file__, 'exec')) with open(__file__) as f:
exec(compile(f.read(), __file__, 'exec'))
\ No newline at end of file
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