Skip to content

Commit

Permalink
Explicitly set character encoding for locustfile downloaded from master.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberw committed Mar 8, 2024
1 parent 6241e9c commit 0524836
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion locust/argument_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def wait_for_reply():
sys.exit(1)

filename = msg.data["filename"]
with open(os.path.join(tempfile.gettempdir(), filename), "w") as locustfile:
with open(os.path.join(tempfile.gettempdir(), filename), "w", encoding="utf-8") as locustfile:
locustfile.write(msg.data["contents"])

def exit_handler():
Expand Down

0 comments on commit 0524836

Please sign in to comment.