1
0
mirror of https://github.com/mbirth/tcl_ota_check.git synced 2024-11-09 22:06:47 +00:00

Allow specifying a model number for PRD scanning.

This commit is contained in:
Markus Birth 2017-10-10 13:28:52 +02:00
parent f0c5c94ce9
commit 0d250087f9

View File

@ -4,6 +4,7 @@
# pylint: disable=C0111,C0326,C0103
import collections
import sys
import tcllib
from requests.exceptions import RequestException, Timeout
@ -29,6 +30,11 @@ with open("prds.txt", "r") as afile:
for key, value in prdc.items():
prddict[key].append(value)
if len(sys.argv) > 1:
prdkeys = list(prddict.keys())
for k in prdkeys:
if k != sys.argv[1]:
del prddict[k]
for center in sorted(prddict.keys()):