Skip to content

Commit

Permalink
define mode for tmp file (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
Atticus1806 authored Aug 2, 2023
1 parent 5525542 commit 454943a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sisyphus/cleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def remove_directories(dirs, message, move_postfix='.cleanup', mode='remove', fo
for i in tmp:
logging.info(i)
else:
with tempfile.NamedTemporaryFile() as tmp_file:
with tempfile.NamedTemporaryFile(mode="w") as tmp_file:
for directory in dirs:
tmp_file.write(directory + "\x00")
tmp_file.flush()
Expand Down

0 comments on commit 454943a

Please sign in to comment.