feat: Add support for esptool v5 and keep v4 for now

This commit is contained in:
Peter Dragun
2025-08-15 22:43:34 +02:00
parent 23517c9317
commit eba6b814ba
7 changed files with 240 additions and 175 deletions

View File

@@ -38,7 +38,7 @@ def get_running_partition(port=None):
try:
# Check what esptool.py finds on what port the device is connected to
output = subprocess.check_output([sys.executable, ESPTOOL_PY, 'chip_id']) # may raise CalledProcessError
pattern = r'Serial port ([\S]+)'
pattern = r'Serial port ([^:\s]+)'
pattern = re.compile(pattern.encode())
port = re.search(pattern, output).group(1) # may raise AttributeError