pySim-prog.py: fix SyntaxWarning: using is with a literal

Change-Id: If9460bf827242a1dfc518213e3faa9137a21869a
This commit is contained in:
Vadim Yanitskiy
2023-04-14 00:11:19 +07:00
parent 7b9e24482d
commit 0d80fa9150

View File

@@ -599,9 +599,9 @@ def read_params_csv(opts, imsi=None, iccid=None):
# commandline options we can use that info, otherwise we guess that # commandline options we can use that info, otherwise we guess that
# the length is 2, which is also the most common case. # the length is 2, which is also the most common case.
if opts.mnclen != "auto": if opts.mnclen != "auto":
if opts.mnclen is "2": if opts.mnclen == "2":
row['mnc'] = row.get('mnc', mnc_from_imsi(row.get('imsi'), False)) row['mnc'] = row.get('mnc', mnc_from_imsi(row.get('imsi'), False))
elif opts.mnclen is "3": elif opts.mnclen == "3":
row['mnc'] = row.get('mnc', mnc_from_imsi(row.get('imsi'), True)) row['mnc'] = row.get('mnc', mnc_from_imsi(row.get('imsi'), True))
else: else:
raise ValueError("invalid parameter --mnclen, must be 2 or 3 or auto") raise ValueError("invalid parameter --mnclen, must be 2 or 3 or auto")