Skip to content
Snippets Groups Projects
Verified Commit df5c56d7 authored by Erwan Rouchet's avatar Erwan Rouchet
Browse files

Handle bytes in YAML caching

parent 99504a12
No related branches found
No related tags found
1 merge request!62Handle bytes in YAML caching
Pipeline #78250 passed
......@@ -30,7 +30,9 @@ def cache_yaml(monkeypatch):
# Create a unique cache key for direct YAML strings
# and file descriptors
if isinstance(yaml_payload, str):
key = hashlib.md5(yaml_payload.encode("utf-8")).hexdigest()
yaml_payload = yaml_payload.encode("utf-8")
if isinstance(yaml_payload, bytes):
key = hashlib.md5(yaml_payload).hexdigest()
else:
key = yaml_payload.name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment