From 72090895fccc271f346dc7edb19a53f94e0b8d22 Mon Sep 17 00:00:00 2001 From: Jeffrey Kinard Date: Fri, 20 Dec 2024 15:16:54 -0500 Subject: [PATCH] [yaml] allow logging bytes in LogForTesting Signed-off-by: Jeffrey Kinard --- sdks/python/apache_beam/yaml/yaml_provider.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/python/apache_beam/yaml/yaml_provider.py b/sdks/python/apache_beam/yaml/yaml_provider.py index a07638953551..8dfa314aeb62 100755 --- a/sdks/python/apache_beam/yaml/yaml_provider.py +++ b/sdks/python/apache_beam/yaml/yaml_provider.py @@ -907,7 +907,7 @@ def log_for_testing( def to_loggable_json_recursive(o): if isinstance(o, (str, bytes)): - return o + return str(o) elif callable(getattr(o, '_asdict', None)): return to_loggable_json_recursive(o._asdict()) elif isinstance(o, Mapping) and callable(getattr(o, 'items', None)):