1
0
mirror of https://github.com/mbirth/tcl_ota_check.git synced 2024-11-09 22:06:47 +00:00

work around encoding errors with chinese text in check response

This commit is contained in:
thurask 2017-11-03 01:32:19 -04:00
parent cb1418b3f9
commit 79357d7fdd
No known key found for this signature in database
GPG Key ID: A6CCCDEA29795048

View File

@ -145,7 +145,7 @@ class FotaCheck:
except OSError as e:
if e.errno != errno.EEXIST:
raise
with open(outfile, "w") as f:
with open(outfile, "w", encoding="utf-8") as f:
f.write(data)
def do_check(self, https=True, timeout=10, max_tries=5):