Skip to content

Commit

Permalink
Merge pull request #31 from AnsgarSchmidt/to-argument-value-support-str
Browse files Browse the repository at this point in the history
Supporting native str when parsing args
  • Loading branch information
fqqb authored Nov 19, 2024
2 parents 2b9f725 + 03a7c3f commit 578a643
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 578a643

Please sign in to comment.