1
0
mirror of https://github.com/mbirth/tcl_ota_check.git synced 2024-11-10 06:16:46 +00:00
This commit is contained in:
thurask 2017-08-10 10:48:50 -04:00
parent 1543649426
commit 61c2a9cbfc
2 changed files with 14 additions and 1 deletions

1
prds.txt Normal file
View File

@ -0,0 +1 @@
PRD-63116-001/nPRD-63116-003/nPRD-63116-005/nPRD-63116-007/nPRD-63116-009/nPRD-63116-010/nPRD-63116-013/nPRD-63116-017/nPRD-63116-020/nPRD-63116-021/nPRD-63116-027/nPRD-63116-033/nPRD-63117-003/nPRD-63117-011/nPRD-63117-015/nPRD-63117-019/nPRD-63117-023/nPRD-63117-025/nPRD-63117-027/nPRD-63117-028/nPRD-63117-029/nPRD-63117-041/nPRD-63117-703/nPRD-63117-704/nPRD-63118-001/nPRD-63734-001/nPRD-63734-002/nPRD-63763-001/nPRD-63764-001/n

View File

@ -72,6 +72,11 @@ def parse_request(body):
return "http://{0}{1}".format(slave, dlurl) return "http://{0}{1}".format(slave, dlurl)
def main2(sess, serid, curef):
checktext = check(sess, serid, curef)
tv, fwid, fn, fs, fh = parse_check(checktext)
print("{0}: {1}".format(curef, tv))
def main(sess, serid, curef): def main(sess, serid, curef):
checktext = check(sess, serid, curef) checktext = check(sess, serid, curef)
tv, fwid, filename, filesize, filehash = parse_check(checktext) tv, fwid, filename, filesize, filehash = parse_check(checktext)
@ -87,6 +92,13 @@ if __name__ == "__main__":
sess = prep_sess() sess = prep_sess()
serid = "543212345000000" serid = "543212345000000"
if len(sys.argv) > 1: if len(sys.argv) > 1:
if sys.argv[1] == "l":
with open("prds.txt", "r") as afile:
prdx = afile.read()
prds = prdx.split("/n")
for prd in prds:
main2(sess, serid, prd)
else:
curef = sys.argv[1] curef = sys.argv[1]
else: else:
curef = "PRD-63764-001" curef = "PRD-63764-001"