Skip to content

Commit

Permalink
Fix file open (#188)
Browse files Browse the repository at this point in the history
* Fixed #181 
* Added change for capture_output_file arg fix
* update CHANGES
  • Loading branch information
whitead authored Sep 15, 2020
1 parent a4492a1 commit 76ac509
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
==============================

2020-xx-xx 0.8.1
orbeckst, PolyachenkoYA
orbeckst, PolyachenkoYA, whitead

* fixed: core._run_command capture_output_file argument fixed to us python-3.0
file open (#181)
* fixed: xvg._decimate used python-2.0-specific func_name() (issue #183)
* fixed: make parsing gmx output more robust to avoid failure on
'import gromacs' (PR #186)
Expand Down
2 changes: 1 addition & 1 deletion gromacs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def _run_command(self, *args, **kwargs):
else:
# XXX: not race or thread proof; potentially many commands write to the same file
fn = environment.flags['capture_output_filename']
capturefile = file(fn, "w") # overwrite (clobber) capture file
capturefile = open(fn, "w") # overwrite (clobber) capture file
if 'stdout' in kwargs and 'stderr' not in kwargs:
# special case of stdout used by code but stderr should be captured to file
kwargs.setdefault('stderr', capturefile)
Expand Down

0 comments on commit 76ac509

Please sign in to comment.