pySim-prog: Also accept 18-digit ICCIDs
There are cards with 18-digit ICCIDs, so let's be a bit more tolerant. Change-Id: I5395daeb2e96987335f6f9bf540c28d516001394
This commit is contained in:
@@ -357,8 +357,8 @@ def gen_parameters(opts):
|
|||||||
# ICCID (19 digits, E.118), though some phase1 vendors use 20 :(
|
# ICCID (19 digits, E.118), though some phase1 vendors use 20 :(
|
||||||
if opts.iccid is not None:
|
if opts.iccid is not None:
|
||||||
iccid = opts.iccid
|
iccid = opts.iccid
|
||||||
if not _isnum(iccid, 19) and not _isnum(iccid, 20):
|
if not _isnum(iccid, 18) and not _isnum(iccid, 19) and not _isnum(iccid, 20):
|
||||||
raise ValueError('ICCID must be 19 or 20 digits !')
|
raise ValueError('ICCID must be 18, 19 or 20 digits !')
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if opts.num is None:
|
if opts.num is None:
|
||||||
|
|||||||
Reference in New Issue
Block a user