dexter has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/34155?usp=email )
Change subject: sim-reset-server: fix error printing sw_match_error ......................................................................
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 --- M contrib/sim-rest-server.py 1 file changed, 16 insertions(+), 1 deletion(-)
Approvals: fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, approved Jenkins Builder: Verified
diff --git a/contrib/sim-rest-server.py b/contrib/sim-rest-server.py index 83fb377..fc8afd9 100755 --- a/contrib/sim-rest-server.py +++ b/contrib/sim-rest-server.py @@ -101,7 +101,7 @@ 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')