From 0d250087f9159587f6afc99d5519043e1013ea51 Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Tue, 10 Oct 2017 13:28:52 +0200 Subject: [PATCH] Allow specifying a model number for PRD scanning. --- tclcheck_findprd.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tclcheck_findprd.py b/tclcheck_findprd.py index 274c15c..104231d 100644 --- a/tclcheck_findprd.py +++ b/tclcheck_findprd.py @@ -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()):