mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
change(ci): limit printing OpenOCD connection errors
This commit is contained in:
+4
-2
@@ -216,7 +216,7 @@ class OpenOCD:
|
|||||||
ocd_env = os.environ.copy()
|
ocd_env = os.environ.copy()
|
||||||
ocd_env['LIBUSB_DEBUG'] = '1'
|
ocd_env['LIBUSB_DEBUG'] = '1'
|
||||||
|
|
||||||
for _ in range(1, self.MAX_RETRIES + 1):
|
for attempt in range(1, self.MAX_RETRIES + 1):
|
||||||
try:
|
try:
|
||||||
self.proc = pexpect.spawn(
|
self.proc = pexpect.spawn(
|
||||||
command='openocd',
|
command='openocd',
|
||||||
@@ -232,7 +232,9 @@ class OpenOCD:
|
|||||||
self.write(f'log_output {self.log_file}')
|
self.write(f'log_output {self.log_file}')
|
||||||
return self
|
return self
|
||||||
except (pexpect.exceptions.EOF, pexpect.exceptions.TIMEOUT, ConnectionRefusedError) as e:
|
except (pexpect.exceptions.EOF, pexpect.exceptions.TIMEOUT, ConnectionRefusedError) as e:
|
||||||
logging.error('Error running OpenOCD: %s', str(e))
|
logging.error(
|
||||||
|
'OpenOCD connection attempt %d/%d failed. Error: %s', attempt, self.MAX_RETRIES, type(e).__name__
|
||||||
|
)
|
||||||
self.kill()
|
self.kill()
|
||||||
time.sleep(self.RETRY_DELAY)
|
time.sleep(self.RETRY_DELAY)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user