Skip to content

Commit

Permalink
Supporting native str when parsing args
Browse files Browse the repository at this point in the history
Signed-off-by: Ansgar Schmidt <ansgar.schmidt@orbitalsystems.de>
  • Loading branch information
Ansgar Schmidt committed Nov 19, 2024
1 parent 2b9f725 commit 03a7c3f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions yamcs-client/src/yamcs/client/core/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ def to_named_object_ids(
def to_argument_value(value, force_string):
if isinstance(value, (bytes, bytearray)):
return binascii.hexlify(value).decode("ascii")
elif isinstance(value, str):
return value
elif isinstance(value, collections.abc.Mapping):
# Careful to do the JSON dump only at the end,
# and not at every level of a nested hierarchy
Expand Down

0 comments on commit 03a7c3f

Please sign in to comment.