mirror of https://gerrit.osmocom.org/pysim
pySim-prog: add python docstring for read_params_csv
Change-Id: I098ff56ef38208f2f321194625ff4279ece2023cchanges/14/30714/1
parent
5f0cb3c5f2
commit
4237ccfb45
|
@ -584,6 +584,12 @@ def find_row_in_csv_file(csv_file_name:str, num=None, iccid=None, imsi=None):
|
|||
|
||||
|
||||
def read_params_csv(opts, imsi=None, iccid=None):
|
||||
"""
|
||||
Read the card parameters from a CSV file. This function will generate the
|
||||
same dictionary that gen_parameters would generate from parameters passed as
|
||||
commandline arguments.
|
||||
"""
|
||||
|
||||
row = find_row_in_csv_file(opts.read_csv, opts.num, iccid=iccid, imsi=imsi)
|
||||
if row is not None:
|
||||
row['mcc'] = row.get('mcc', mcc_from_imsi(row.get('imsi')))
|
||||
|
|
Loading…
Reference in New Issue