Skip to content

Commit 3eb7482

Browse files
pmaier-sysmolaf0rge
authored andcommitted
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
1 parent 3dc0496 commit 3eb7482

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pySim-prog.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,8 @@ def parse_options():
197197
return options
198198

199199
if options.source == 'csv':
200-
if (options.imsi is None) and (options.batch_mode is False) and (options.read_imsi is False) and (options.read_iccid is False):
201-
parser.error(
202-
"CSV mode needs either an IMSI, --read-imsi, --read-iccid or batch mode")
200+
if (options.imsi is None) and (options.iccid is None) and (options.read_imsi is False) and (options.read_iccid is False):
201+
parser.error("CSV mode requires one additional parameter: --read-iccid, --read-imsi, --iccid or --imsi")
203202
if options.read_csv is None:
204203
parser.error("CSV mode requires a CSV input file")
205204
elif options.source == 'cmdline':

0 commit comments

Comments
 (0)