Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
elad-c committed Feb 2, 2025
1 parent dbf6028 commit 4cf3dff
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions tests/doc_tests/test_docs_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,22 @@ def check_link(_url, branch_name):
response = requests.get(_url)
if response.status_code == 200:
return True
except:
try:
print('===================================================================')
print(_url)
print(_url.replace('/main/', f'/{branch_name}/'))
print('===================================================================')
response = requests.get(_url.replace('/main/', f'/{branch_name}/'))
if response.status_code == 200:
return True
except Exception as e:
print(f"Error checking link '{_url}': {e}")
return False
except Exception as e:
print(f"Error checking link '{_url}': {e}")

try:
print('===================================================================')
print(_url)
_url = _url.replace('/main/', f'/{branch_name}/')
print(_url)
print('===================================================================')
response = requests.get(_url)
if response.status_code == 200:
return True
except Exception as e:
print(f"Error checking link '{_url}': {e}")

return False

@staticmethod
def get_branch_name():
Expand Down

0 comments on commit 4cf3dff

Please sign in to comment.