Skip to content

Commit

Permalink
Merge pull request #7583 from andresailer/fixSecWrite
Browse files Browse the repository at this point in the history
[8.0]: Fix issue when using secureWrite in binary mode
  • Loading branch information
chrisburr authored Apr 23, 2024
2 parents e57a310 + 093575e commit a7ed27c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DIRAC/Core/Utilities/File.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def secureOpenForWrite(filename=None, *, text=True):
)
else:
fd, filename = tempfile.mkstemp(text=text)
with open(fd, "w" if text else "wb", encoding="ascii") as fd:
with open(fd, "w" if text else "wb", encoding="ascii" if text else None) as fd:
yield fd, filename


Expand Down

0 comments on commit a7ed27c

Please sign in to comment.