Skip to content

Commit

Permalink
WIP: revert
Browse files Browse the repository at this point in the history
  • Loading branch information
tyeth committed Mar 7, 2024
1 parent 131d107 commit c77a66d
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
36 changes: 36 additions & 0 deletions board-url-test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

import requests
from requests.exceptions import SSLError, RequestException

# List of URLs to check
urls = [
"https://adafruit.github.io/arduino-board-index/package_adafruit_index.json",
"http://arduino.esp8266.com/stable/package_esp8266com_index.json",
"https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json",
"https://sandeepmistry.github.io/arduino-nRF5/package_nRF5_boards_index.json",
"https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json",
"http://drazzy.com/package_drazzy.com_index.json",
"http://drazzy.good-enough.cloud/package_drazzy.com_index.json"
]

def check_url(url):
try:
# Attempt to request URL with SSL verification
response = requests.get(url)
response.raise_for_status() # Raise an error for bad status codes
print(f"URL accessible: {url}")
except SSLError as ssl_error:
print(f"URL failed with SSL error: {url}, Error: {ssl_error}, retrying without SSL verification...")
# Retry without SSL verification if an SSL error occurs
try:
response = requests.get(url, verify=False)
response.raise_for_status()
print(f"URL accessible (without SSL verification): {url}")
except RequestException as e:
print(f"URL still failed after disabling SSL verification: {url}, Error: {e}")
except RequestException as e:
# Handle other errors
print(f"URL failed: {url}, Error: {e}")

for url in urls:
check_url(url)
3 changes: 3 additions & 0 deletions quick_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
repo_topics=$(curl -f --request GET --url "https://api.github.com/repos/$GITHUB_REPOSITORY" || echo '{"topics":[]}')
repo_topics=$(echo $repo_topics | jq -r '.topics[]' )
echo $repo_topics

0 comments on commit c77a66d

Please sign in to comment.