Skip to content

Commit

Permalink
Use supported operand types by casting to string instead of Optional[…
Browse files Browse the repository at this point in the history
…str] (#954)
  • Loading branch information
shastriUF committed Jun 23, 2023
1 parent 562c99a commit bdb19da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/nirfsg/attenuation-tables-generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def raise_if_initialization_error(response):
input("Press any key to stop generation")
raise_if_error(client.Abort(nirfsg_types.AbortRequest(vi=vi)))
except grpc.RpcError as rpc_error:
error_message = rpc_error.details()
error_message = str(rpc_error.details() or "")
for entry in rpc_error.trailing_metadata() or []:
if entry.key == "ni-error":
value = entry.value if isinstance(entry.value, str) else entry.value.decode("utf-8")
Expand Down

0 comments on commit bdb19da

Please sign in to comment.