dexter submitted this change.
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(-)
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>')
To view, visit change 34155. To unsubscribe, or for help writing mail filters, visit settings.