mirror of https://gerrit.osmocom.org/pysim
sim-reset-server: fix error printing sw_match_error
In the last line of the if,elif,else branch, when we print the ApiError object, we pass the variable sw to str() instead passing it to ApiError() like we do it in the lines above. This is not correct and causes strange exceptions. Related: OS#67094 Change-Id: I5a1d19abeb00c2c9dc26517abc44a5c916f2d658
This commit is contained in:
parent
7d13845285
commit
3a37ad015c
|
@ -101,7 +101,7 @@ class SimRestServer:
|
||||||
elif sw == '6982':
|
elif sw == '6982':
|
||||||
return str(ApiError("Security Status not satisfied - Card PIN enabled?", sw))
|
return str(ApiError("Security Status not satisfied - Card PIN enabled?", sw))
|
||||||
else:
|
else:
|
||||||
return str(ApiError("Card Communication Error %s" % failure.value), sw)
|
return str(ApiError("Card Communication Error %s" % failure.value, sw))
|
||||||
|
|
||||||
|
|
||||||
@app.route('/sim-auth-api/v1/slot/<int:slot>')
|
@app.route('/sim-auth-api/v1/slot/<int:slot>')
|
||||||
|
|
Loading…
Reference in New Issue