pySim-prog: treat --imsi and --iccid equally
When using a CSV file, we can either read the IMSI or ICCID from the CSV file before programming. However, should also be possible to supply both manually to identify the CSV file entry using the --imsi or --iccid option. This currently only works for the IMSI, but not for the ICCID. Related: SYS#4120 Change-Id: Id3083c7794a7bd59501997f22afdc23bad3069e6
This commit is contained in:
@@ -732,12 +732,12 @@ def process_card(scc, opts, first, ch):
|
||||
if opts.source == 'cmdline':
|
||||
cp = gen_parameters(opts)
|
||||
elif opts.source == 'csv':
|
||||
imsi = None
|
||||
iccid = None
|
||||
if opts.read_iccid:
|
||||
(res, _) = scc.read_binary(['3f00', '2fe2'], length=10)
|
||||
iccid = dec_iccid(res)
|
||||
elif opts.read_imsi:
|
||||
else:
|
||||
iccid = opts.iccid
|
||||
if opts.read_imsi:
|
||||
(res, _) = scc.read_binary(EF['IMSI'])
|
||||
imsi = swap_nibbles(res)[3:]
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user