Skip to content

Commit

Permalink
[yaml] allow logging bytes in LogForTesting (#33433)
Browse files Browse the repository at this point in the history
Signed-off-by: Jeffrey Kinard <[email protected]>
  • Loading branch information
Polber authored Dec 26, 2024
1 parent c1b9fac commit 74bcba1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdks/python/apache_beam/yaml/yaml_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)):
Expand Down

0 comments on commit 74bcba1

Please sign in to comment.