do not try to read a yaml of a symlink to /dev/null

This commit is contained in:
Kayou 2024-07-17 14:18:54 +02:00 committed by GitHub
parent 998181c5e0
commit 9e2ae63c4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -96,7 +96,7 @@ def _update_log_parent_symlinks():
name = log_md[: -len(METADATA_FILE_EXT)]
parent_symlink = os.path.join(OPERATIONS_PATH, f"{name}.parent.yml")
if not os.path.exists(parent_symlink) or os.path.islink(parent_symlink):
if (os.path.islink(log_file) and os.path.realpath(log_file) == "/dev/null") or os.path.islink(parent_symlink):
continue
try: