From 407ac1031e22a4921a6f35d4ec9d6f30a1ea69ca Mon Sep 17 00:00:00 2001 From: thurask Date: Wed, 8 Nov 2017 16:25:31 -0500 Subject: [PATCH] force utf-8 encoding when writing xml --- tcllib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcllib.py b/tcllib.py index b6c9a55..7bb6716 100644 --- a/tcllib.py +++ b/tcllib.py @@ -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):