Skip to content

Commit df45e99

Browse files
authored
use fixed release Arduino lib package
1 parent 5b628b7 commit df45e99

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

platform.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import contextlib
1717
import json
1818
import requests
19-
import socket
2019
import subprocess
2120
import sys
2221
import shutil
@@ -35,7 +34,6 @@
3534
MKLITTLEFS_VERSION_400 = "4.0.0"
3635
DEFAULT_DEBUG_SPEED = "5000"
3736
DEFAULT_APP_OFFSET = "0x10000"
38-
ARDUINO_ESP32_PACKAGE_URL = "https://raw.githubusercontent.com/espressif/arduino-esp32/master/package/package_esp32_index.template.json"
3937

4038
# MCUs that support ESP-builtin debug
4139
ESP_BUILTIN_DEBUG_MCUS = frozenset([
@@ -86,14 +84,6 @@
8684
# Configure logger
8785
logger = logging.getLogger(__name__)
8886

89-
def is_internet_available():
90-
"""Check if connected to Internet"""
91-
try:
92-
with socket.create_connection(("8.8.8.8", 53), timeout=3):
93-
return True
94-
except OSError:
95-
return False
96-
9787
def safe_file_operation(operation_func):
9888
"""Decorator for safe filesystem operations with error handling."""
9989
def wrapper(*args, **kwargs):
@@ -310,16 +300,6 @@ def _configure_arduino_framework(self, frameworks: List[str]) -> None:
310300
self.packages["framework-arduinoespressif32"]["optional"] = False
311301
self.packages["framework-arduinoespressif32-libs"]["optional"] = False
312302

313-
if is_internet_available():
314-
try:
315-
response = requests.get(ARDUINO_ESP32_PACKAGE_URL, timeout=30)
316-
response.raise_for_status()
317-
packjdata = response.json()
318-
dyn_lib_url = packjdata['packages'][0]['tools'][0]['systems'][0]['url']
319-
self.packages["framework-arduinoespressif32-libs"]["version"] = dyn_lib_url
320-
except (requests.RequestException, KeyError, IndexError) as e:
321-
logger.error(f"Failed to fetch Arduino framework library URL: {e}")
322-
323303
def _configure_espidf_framework(
324304
self, frameworks: List[str], variables: Dict, board_config: Dict, mcu: str
325305
) -> None:

0 commit comments

Comments
 (0)