mirror of
https://github.com/netdata/netdata.git
synced 2025-04-17 11:12:42 +00:00
add try except (#17352)
This commit is contained in:
parent
3acc67a1c7
commit
758f63e9a4
1 changed files with 5 additions and 2 deletions
|
@ -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])
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue