Skip to content

Commit

Permalink
fix hanging file warning
Browse files Browse the repository at this point in the history
  • Loading branch information
loriab committed Sep 23, 2024
1 parent f488e72 commit 10a264d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 2 additions & 3 deletions qcengine/programs/nwchem/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,8 @@ def get_version(self) -> str:
if "nwchem branch" in line:
branch = line.strip().split()[-1]
if "nwchem revision" in line:
revision = "+" + line.strip().split()[-1]
revision = "" if (revision == "+N/A") else revision
self.version_cache[which_prog] = safe_version(branch + revision)
revision = line.strip().split()[-1]
self.version_cache[which_prog] = safe_version(branch + "+" + revision)
else:
raise UnknownError(output["stderr"])

Expand Down
2 changes: 2 additions & 0 deletions qcengine/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,8 @@ def read_from_buffer(buffer: BinaryIO, storage: io.BytesIO, sysio: TextIO):
# Retrieve the standard output for the process
ret["stdout"] = stdout.getvalue().decode()
ret["stderr"] = stderr.getvalue().decode()
ret["proc"].stdout.close()
ret["proc"].stderr.close()


@contextmanager
Expand Down

0 comments on commit 10a264d

Please sign in to comment.