Skip to content

Commit

Permalink
[yaml] allow logging bytes in LogForTesting
Browse files Browse the repository at this point in the history
Signed-off-by: Jeffrey Kinard <[email protected]>
  • Loading branch information
Polber committed Dec 20, 2024
1 parent 7c86bf3 commit 7209089
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 7209089

Please sign in to comment.