0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-17 11:12:42 +00:00

add try except ()

This commit is contained in:
Fotis Voutsas 2024-04-09 14:01:21 +03:00 committed by GitHub
parent 3acc67a1c7
commit 758f63e9a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -335,8 +335,11 @@ def make_symlinks(symlink_dict):
takes a dictionary with directories that have a 1:1 relationship between their README and the integration (only one) inside the "integrations" folder.
"""
for element in symlink_dict:
# Remove the README to prevent it being a normal file
Path(f'{element}/README.md').unlink()
try:
# Remove the README to prevent it being a normal file
Path(f'{element}/README.md').unlink()
except FileNotFoundError:
continue
# and then make a symlink to the actual markdown
Path(f'{element}/README.md').symlink_to(symlink_dict[element])