mirror of
https://github.com/mbirth/tcl_ota_check.git
synced 2024-11-09 22:06:47 +00:00
Force proper encoding before handling XML.
This commit is contained in:
parent
0446ac89e5
commit
697e332eb8
@ -175,6 +175,7 @@ class FotaCheck:
|
|||||||
last_response = req
|
last_response = req
|
||||||
if req.status_code == 200:
|
if req.status_code == 200:
|
||||||
self.master_server_vote_on_time(reqtime, reqtime_avg)
|
self.master_server_vote_on_time(reqtime, reqtime_avg)
|
||||||
|
req.encoding = "utf-8" # Force encoding as server doesn't give one
|
||||||
self.write_dump(req.text)
|
self.write_dump(req.text)
|
||||||
return req.text
|
return req.text
|
||||||
elif req.status_code == 204:
|
elif req.status_code == 204:
|
||||||
@ -282,6 +283,7 @@ class FotaCheck:
|
|||||||
#print(repr(dict(params)))
|
#print(repr(dict(params)))
|
||||||
req = self.sess.post(url, data=params)
|
req = self.sess.post(url, data=params)
|
||||||
if req.status_code == 200:
|
if req.status_code == 200:
|
||||||
|
req.encoding = "utf-8" # Force encoding as server doesn't give one
|
||||||
self.write_dump(req.text)
|
self.write_dump(req.text)
|
||||||
return req.text
|
return req.text
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user