1
0
mirror of https://github.com/mbirth/tcl_ota_check.git synced 2024-11-12 23:36:46 +00:00

add prd filter to tclcheck_allfull

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

View File

@ -3,6 +3,7 @@
# pylint: disable=C0111,C0326,C0103
import sys
import tcllib
from requests.exceptions import RequestException, Timeout
@ -13,17 +14,23 @@ fc.serid = "3531510"
fc.fv = "AAA000"
fc.mode = fc.MODE.FULL
dp = tcllib.DefaultParser(__file__)
dp.add_argument("-p", "--prd", dest="tocheck", nargs="?", default=None)
args = dp.parse_args(sys.argv[1:])
# CLTP = 10 (only show actual updates or HTTP 206) / 2010 (always show latest version for MODE.FULL)
#fc.cltp = fc.CLTP.MOBILE
fc.cltp = fc.CLTP.DESKTOP
prdcheck = "" if args.tocheck is None else args.tocheck
print("List of latest FULL firmware by PRD:")
with open("prds.txt", "rt") as f:
for prdline in f:
prdline = prdline.strip()
prd, lastver, model = prdline.split(" ", 2)
if prdcheck in prd:
try:
fc.reset_session()
fc.curef = prd