laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/33672 )
Change subject: pySim-prog: Also accept 18-digit ICCIDs ......................................................................
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 --- M pySim-prog.py 1 file changed, 13 insertions(+), 2 deletions(-)
Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved
diff --git a/pySim-prog.py b/pySim-prog.py index 7c644b7..028db55 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -357,8 +357,8 @@ # ICCID (19 digits, E.118), though some phase1 vendors use 20 :( if opts.iccid is not None: iccid = opts.iccid - if not _isnum(iccid, 19) and not _isnum(iccid, 20): - raise ValueError('ICCID must be 19 or 20 digits !') + if not _isnum(iccid, 18) and not _isnum(iccid, 19) and not _isnum(iccid, 20): + raise ValueError('ICCID must be 18, 19 or 20 digits !')
else: if opts.num is None: