Skip to content

Commit

Permalink
Adding docstring for _save_result
Browse files Browse the repository at this point in the history
  • Loading branch information
mtlynch committed Apr 6, 2016
1 parent 91a6363 commit 7991776
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions client_wrapper/client_wrapper.py
Expand Up @@ -39,6 +39,15 @@ def main(args):


def _save_result(result, output_dir):
"""Saves an NdtResult instance to a file in output_dir.
Serializes an NdtResult to JSON format, automatically generates a
filename based on the NdtResult metadata, then saves it to output_dir.
Args:
result: NdtResult instance to save.
output_dir: Directory in which to result file.
"""
output_filename = filename.create_result_filename(result)
output_path = os.path.join(output_dir, output_filename)
with open(output_path, 'w') as output_file:
Expand Down

0 comments on commit 7991776

Please sign in to comment.