mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-16 18:38:32 +03:00
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:
@@ -101,7 +101,7 @@ class SimRestServer:
|
||||
elif sw == '6982':
|
||||
return str(ApiError("Security Status not satisfied - Card PIN enabled?", sw))
|
||||
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>')
|
||||
|
||||
Reference in New Issue
Block a user