|
15 | 15 | import fnmatch
|
16 | 16 | import os
|
17 | 17 | import json
|
18 |
| -import requests |
19 |
| -import socket |
20 | 18 | import subprocess
|
21 | 19 | import sys
|
22 | 20 | import shutil
|
|
33 | 31 | SUBPROCESS_TIMEOUT = 300
|
34 | 32 | DEFAULT_DEBUG_SPEED = "5000"
|
35 | 33 | DEFAULT_APP_OFFSET = "0x10000"
|
36 |
| -ARDUINO_ESP32_PACKAGE_URL = "https://raw.githubusercontent.com/espressif/arduino-esp32/release/v3.3.x/package/package_esp32_index.template.json" |
37 | 34 |
|
38 | 35 | # MCUs that support ESP-builtin debug
|
39 | 36 | ESP_BUILTIN_DEBUG_MCUS = frozenset([
|
|
84 | 81 | # Configure logger
|
85 | 82 | logger = logging.getLogger(__name__)
|
86 | 83 |
|
87 |
| -def is_internet_available(): |
88 |
| - """Check if connected to Internet""" |
89 |
| - try: |
90 |
| - with socket.create_connection(("8.8.8.8", 53), timeout=3): |
91 |
| - return True |
92 |
| - except OSError: |
93 |
| - return False |
94 |
| - |
95 | 84 | def safe_file_operation(operation_func):
|
96 | 85 | """Decorator for safe filesystem operations with error handling."""
|
97 | 86 | def wrapper(*args, **kwargs):
|
@@ -345,15 +334,6 @@ def _configure_arduino_framework(self, frameworks: List[str]) -> None:
|
345 | 334 | self.packages["framework-arduinoespressif32"]["optional"] = False
|
346 | 335 | self.packages["framework-arduinoespressif32-libs"]["optional"] = False
|
347 | 336 |
|
348 |
| - if is_internet_available(): |
349 |
| - try: |
350 |
| - response = requests.get(ARDUINO_ESP32_PACKAGE_URL, timeout=30) |
351 |
| - response.raise_for_status() |
352 |
| - packjdata = response.json() |
353 |
| - dyn_lib_url = packjdata['packages'][0]['tools'][0]['systems'][0]['url'] |
354 |
| - self.packages["framework-arduinoespressif32-libs"]["version"] = dyn_lib_url |
355 |
| - except (requests.RequestException, KeyError, IndexError) as e: |
356 |
| - logger.error(f"Failed to fetch Arduino framework library URL: {e}") |
357 | 337 |
|
358 | 338 | def _configure_espidf_framework(
|
359 | 339 | self, frameworks: List[str], variables: Dict, board_config: Dict, mcu: str
|
|
0 commit comments