Explicit utf-8 encoding where necessary to avoid Unicode errors on Windows (we require/set an utf-8 locale on other systems).

This commit is contained in:
grossmj committed 2015-04-25 11:58:34 -06:00
1 parent d68bf1c263
commit 80a0e0ebf7
7 files changed
+34 -34

No files matched your search

+1 -1
View File
@@ -131,7 +131,7 @@ class Route(object):
record_file = server_config.get("record")
if record_file:
try:
with open(record_file, "a") as f:
with open(record_file, "a", encoding="utf-8") as f:
f.write("curl -X {} 'http://{}{}' -d '{}'".format(request.method, request.host, request.path_qs, json.dumps(request.json)))
f.write("\n")
except OSError as e: