Skip to content

Commit

Permalink
Merge pull request #7591 from DIRACGridBot/cherry-pick-2-a7ed27cc2-in…
Browse files Browse the repository at this point in the history
…tegration

[sweep:integration] [8.0]: Fix issue when using secureWrite in binary mode
  • Loading branch information
fstagni authored Apr 23, 2024
2 parents 08c6656 + 319e908 commit 1429f90
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 1429f90

Please sign in to comment.