@cryptotaxi247 / netdata-1 / commits / 758f63e9a

add try except (#17352)

Fotis Voutsas committed Apr 9, 2024 at 14:01 UTC 758f63e9a4c51e8024018dd9e01e12608bf730a1
1 file changed +5 -2
integrations/gen_docs_integrations.py
+5 -2
@@ -335,8 +335,11 @@ def make_symlinks(symlink_dict):
335 takes a dictionary with directories that have a 1:1 relationship between their README and the integration (only one) inside the "integrations" folder.
336 """
337 for element in symlink_dict:
338 - # Remove the README to prevent it being a normal file
339 - Path(f'{element}/README.md').unlink()
338 + try:
339 + # Remove the README to prevent it being a normal file
340 + Path(f'{element}/README.md').unlink()
341 + except FileNotFoundError:
342 + continue
343 # and then make a symlink to the actual markdown
344 Path(f'{element}/README.md').symlink_to(symlink_dict[element])
345