laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/38165?usp=email )
Change subject: pySim-prog: fix commandline parameter check for CSV mode
......................................................................
pySim-prog: fix commandline parameter check for CSV mode
The CSV mode needs one of the four additional parameters: --imsi
--iccid, --read-iccid or --read-imsi. Also this check is unrelated
to the batch mode. The CSV file parameter reading works independently
from the batch mode.
Related: SYS#4120
Change-Id: I1292afb85122ed2b7944d02ede69c928a453866f
---
M pySim-prog.py
1 file changed, 2 insertions(+), 3 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/pySim-prog.py b/pySim-prog.py
index cd7ac74..b6c86af 100755
--- a/pySim-prog.py
+++ b/pySim-prog.py
@@ -197,9 +197,8 @@
return options
if options.source == 'csv':
- if (options.imsi is None) and (options.batch_mode is False) and (options.read_imsi is False) and (options.read_iccid is False):
- parser.error(
- "CSV mode needs either an IMSI, --read-imsi, --read-iccid or batch mode")
+ if (options.imsi is None) and (options.iccid is None) and (options.read_imsi is False) and (options.read_iccid is False):
+ parser.error("CSV mode requires one additional parameter: --read-iccid, --read-imsi, --iccid or --imsi")
if options.read_csv is None:
parser.error("CSV mode requires a CSV input file")
elif options.source == 'cmdline':
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/38165?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I1292afb85122ed2b7944d02ede69c928a453866f
Gerrit-Change-Number: 38165
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/38162?usp=email )
Change subject: pySim-prog: add FIXME note to tell that writing hlr.db files is broken
......................................................................
pySim-prog: add FIXME note to tell that writing hlr.db files is broken
The writing to osmo-hlr SQLITE files is broken since the SQLITE format
has evolved over time. Let's add a FIXME note to tell that this needs
fixing.
Related: SYS#4120
Change-Id: I2b23f8bb9f3c2adeb48b010834057f5b4fb1e626
---
M pySim-prog.py
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/pySim-prog.py b/pySim-prog.py
index 8d330cb..e238b66 100755
--- a/pySim-prog.py
+++ b/pySim-prog.py
@@ -623,6 +623,9 @@
def write_params_hlr(opts, params):
# SQLite3 OpenBSC HLR
+ # FIXME: The format of the osmo-hlr database has evolved, so that the code below will no longer work.
+ print("Warning: the database format of recent OsmoHLR versions is not compatible with pySim-prog!")
+
if opts.write_hlr:
import sqlite3
conn = sqlite3.connect(opts.write_hlr)
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/38162?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I2b23f8bb9f3c2adeb48b010834057f5b4fb1e626
Gerrit-Change-Number: 38162
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>