mirror of https://gerrit.osmocom.org/pysim
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
This commit is contained in:
parent
f1e1e729c4
commit
eb3b0dd379
|
@ -979,7 +979,9 @@ if __name__ == '__main__':
|
||||||
" it should also be noted that some readers may behave strangely when no card")
|
" it should also be noted that some readers may behave strangely when no card")
|
||||||
print(" is inserted.)")
|
print(" is inserted.)")
|
||||||
print("")
|
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
|
# 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
|
# immediately so that the user does not have to use the shell commands
|
||||||
|
|
Loading…
Reference in New Issue