pySim-prog: add python docstring for read_params_csv

Change-Id: I098ff56ef38208f2f321194625ff4279ece2023c
Philipp Maier 2022-12-20 11:21:47 +01:00
parent 5f0cb3c5f2
commit 4237ccfb45
1 changed files with 6 additions and 0 deletions

View File

@ -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')))