Commit 949e9527 authored by Alexander Kruppa's avatar Alexander Kruppa

Make sure file is closed before file object is deleted

parent d84e4c64
......@@ -2692,7 +2692,8 @@ class SqrtTask(Task):
message = self.submit_command(p, "dep%d" % dep)
if message.get_exitcode(0) != 0:
raise Exception("Program failed")
stdout = stdoutpath.open("r").read()
with stdoutpath.open("r") as stdoutfile:
stdout = stdoutfile.read()
lines = stdout.splitlines()
# Skip last factor which cannot produce a new split on top
# of what the smaller factors did
......
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