mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-26 15:28:35 +03:00
pySim-prog: add python docstring for read_params_csv
Change-Id: I098ff56ef38208f2f321194625ff4279ece2023c
This commit is contained in:
@@ -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):
|
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)
|
row = find_row_in_csv_file(opts.read_csv, opts.num, iccid=iccid, imsi=imsi)
|
||||||
if row is not None:
|
if row is not None:
|
||||||
row['mcc'] = row.get('mcc', mcc_from_imsi(row.get('imsi')))
|
row['mcc'] = row.get('mcc', mcc_from_imsi(row.get('imsi')))
|
||||||
|
|||||||
Reference in New Issue
Block a user