mirror of
https://github.com/mbirth/tcl_ota_check.git
synced 2024-11-10 06:16:46 +00:00
Add method to reset session for multiple update checks for different
PRDs.
This commit is contained in:
parent
03dc98b4e2
commit
d864a2002a
10
tcllib.py
10
tcllib.py
@ -38,10 +38,16 @@ class FotaCheck:
|
|||||||
self.cktp = self.CKTP_CHECKMANUAL
|
self.cktp = self.CKTP_CHECKMANUAL
|
||||||
self.rtd = self.RTD_UNROOTED
|
self.rtd = self.RTD_UNROOTED
|
||||||
self.chnl = self.CHNL_WIFI
|
self.chnl = self.CHNL_WIFI
|
||||||
self.sess = requests.Session()
|
self.reset_session()
|
||||||
|
|
||||||
|
def reset_session(self):
|
||||||
self.g2master = self.get_master_server()
|
self.g2master = self.get_master_server()
|
||||||
#self.req.headers.update({"User-Agent": "com.tcl.fota/5.1.0.2.0029.0, Android"})
|
self.sess = requests.Session()
|
||||||
|
if self.mode == self.MODE_FULL:
|
||||||
|
self.sess.headers.update({"User-Agent": "com.tcl.fota/5.1.0.2.0029.0, Android"})
|
||||||
|
else:
|
||||||
self.sess.headers.update({"User-Agent": "tcl"})
|
self.sess.headers.update({"User-Agent": "tcl"})
|
||||||
|
return self.sess
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_salt():
|
def get_salt():
|
||||||
|
Loading…
Reference in New Issue
Block a user