Skip to content

Commit

Permalink
Merge pull request #19 from MylesIsCool/closeoutput
Browse files Browse the repository at this point in the history
Close output when it's a file
  • Loading branch information
TkTech committed Aug 16, 2016
2 parents d3d3a67 + fd90683 commit 1431dea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions munch.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,3 +255,6 @@ def __repr__(self):
os.remove(client_path)
if url:
os.remove(url_path)
# Cleanup file output (if used)
if output is not sys.stdout:
output.close()

0 comments on commit 1431dea

Please sign in to comment.