Attention is currently required from: dexter.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34155 )

Change subject: sim-reset-server: fix error printing sw_match_error
......................................................................


Patch Set 1:

(1 comment)

File contrib/sim-rest-server.py:

https://gerrit.osmocom.org/c/pysim/+/34155/comment/c6e47279_21e638f9
PS1, Line 104: failure.value
If the information inside value.error is useful, I'd suggest converting it to a 
string instead.

Looks like str(failure.value) would fix this. As I understand it, failure.value 
is of type ApiError when the error mentioned in the commit message appears. And 
the same line already converts an ApiError to str() the same way.

Another (IMHO more elegant) way to write this would be with f-string, which 
implictly converts failure.value to string:

```
return str(ApiError(f"Card Communication Error: {failure.value}"), sw)
```



--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34155
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I5a1d19abeb00c2c9dc26517abc44a5c916f2d658
Gerrit-Change-Number: 34155
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: osmith <[email protected]>
Gerrit-Attention: dexter <[email protected]>
Gerrit-Comment-Date: Thu, 17 Aug 2023 12:50:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Reply via email to