Skip to content
This repository has been archived by the owner on May 2, 2022. It is now read-only.

Commit

Permalink
Merge branch 'BK_writeListToFile_currentWD' of https://github.com/ben…
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiSakuma committed Jun 14, 2017
2 parents f8a8fb3 + a070fdc commit ae07b3c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion alphatwirl/collector/WriteListToFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ def deliver(self, results):
self._close(f)

def _open(self, path):
mkdir_p(os.path.dirname(path))
directory = os.path.dirname(path)
if directory:
mkdir_p(directory)
return open(path, 'w')

def _close(self, file): file.close()
Expand Down

0 comments on commit ae07b3c

Please sign in to comment.