From 3eb74829df34059c0dce23b7ca64579bc9c73058 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Fri, 13 Sep 2024 18:09:46 +0200 Subject: [PATCH] pySim-prog: fix commandline parameter check for CSV mode The CSV mode needs one of the four additional parameters: --imsi --iccid, --read-iccid or --read-imsi. Also this check is unrelated to the batch mode. The CSV file parameter reading works independently from the batch mode. Related: SYS#4120 Change-Id: I1292afb85122ed2b7944d02ede69c928a453866f --- pySim-prog.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pySim-prog.py b/pySim-prog.py index cd7ac742..b6c86af8 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -197,9 +197,8 @@ def parse_options(): return options if options.source == 'csv': - if (options.imsi is None) and (options.batch_mode is False) and (options.read_imsi is False) and (options.read_iccid is False): - parser.error( - "CSV mode needs either an IMSI, --read-imsi, --read-iccid or batch mode") + if (options.imsi is None) and (options.iccid is None) and (options.read_imsi is False) and (options.read_iccid is False): + parser.error("CSV mode requires one additional parameter: --read-iccid, --read-imsi, --iccid or --imsi") if options.read_csv is None: parser.error("CSV mode requires a CSV input file") elif options.source == 'cmdline':