uranusjr commented on code in PR #31943:
URL: https://github.com/apache/airflow/pull/31943#discussion_r1231916592
##########
dev/breeze/src/airflow_breeze/commands/setup_commands.py:
##########
@@ -260,7 +260,11 @@ def dict_hash(dictionary: dict[str, Any]) -> str:
"""MD5 hash of a dictionary. Sorted and dumped via json to account for
random sequence)"""
# noinspection InsecureHash
dhash = hashlib.md5()
- encoded = json.dumps(dictionary, sort_keys=True, default=vars).encode()
+ try:
+ encoded = json.dumps(dictionary, sort_keys=True, default=vars).encode()
+ except TypeError:
+ get_console().print(dictionary)
Review Comment:
```suggestion
get_console().print(repr(dictionary))
```
Since this is TypeError (not ValueError) a repr print would probably be a
bit more useful? I’m just guessing here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]