From 03a7c3f0af932f24a0fbf3a204ea580182ac5dde Mon Sep 17 00:00:00 2001 From: Ansgar Schmidt Date: Tue, 19 Nov 2024 17:04:14 +0100 Subject: [PATCH] Supporting native str when parsing args Signed-off-by: Ansgar Schmidt --- yamcs-client/src/yamcs/client/core/helpers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yamcs-client/src/yamcs/client/core/helpers.py b/yamcs-client/src/yamcs/client/core/helpers.py index 4e0eead..0733e1c 100644 --- a/yamcs-client/src/yamcs/client/core/helpers.py +++ b/yamcs-client/src/yamcs/client/core/helpers.py @@ -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