dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35102?usp=email )
Change subject: pySim-shell: refuse to execute a startup script on initialization errors ...................................................................... pySim-shell: refuse to execute a startup script on initialization errors When there is an error on initialization (e.g. card not present), we should not continue to execute a startup script that was passed with the pySim-shell commandline. Instead we should print a message that the startup script was ignored due to errors. Related: OS#6271 Change-Id: I61329988e0e9021b5b0ef8e0819fb8e23cabf38b --- M pySim-shell.py 1 file changed, 18 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/02/35102/1 diff --git a/pySim-shell.py b/pySim-shell.py index 795276a..4e08eb7 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -979,7 +979,9 @@ " it should also be noted that some readers may behave strangely when no card") print(" is inserted.)") print("") - app = PysimApp(None, None, sl, ch, opts.script) + if opts.script: + print("will not execute startup script due to card initialization errors!") + app = PysimApp(None, None, sl, ch) # If the user supplies an ADM PIN at via commandline args authenticate # immediately so that the user does not have to use the shell commands -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35102?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I61329988e0e9021b5b0ef8e0819fb8e23cabf38b Gerrit-Change-Number: 35102 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pma...@sysmocom.de> Gerrit-MessageType: newchange