Fixed automatic connection in idf_monitor

Closes https://github.com/espressif/esp-idf/issues/6415
This commit is contained in:
Martin Gaňo
2021-02-01 11:40:03 +01:00
parent 31e565c3d5
commit 179e23b38a
2 changed files with 20 additions and 6 deletions

View File

@@ -2,9 +2,14 @@ class FatalError(RuntimeError):
"""
Wrapper class for runtime errors that aren't caused by bugs in idf.py or the build process.
"""
def __init__(self, message, ctx=None):
super(RuntimeError, self).__init__(message)
# if context is defined, check for the cleanup tasks
if ctx is not None and 'cleanup' in ctx.meta:
# cleans up the environment before failure
ctx.meta['cleanup']()
class NoSerialPortFoundError(FatalError):
pass