From 88d0d1fa02e98e079c0f39f3524f18cabca78182 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Tue, 29 Dec 2020 15:41:22 +1100 Subject: [PATCH] ci: Don't swallow exception details from flashing process If flashing fails, throw an exception that includes some information about the failure. --- tools/ci/python_packages/ttfw_idf/IDFDUT.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/ci/python_packages/ttfw_idf/IDFDUT.py b/tools/ci/python_packages/ttfw_idf/IDFDUT.py index 99f7254acb..1cff21dc26 100644 --- a/tools/ci/python_packages/ttfw_idf/IDFDUT.py +++ b/tools/ci/python_packages/ttfw_idf/IDFDUT.py @@ -263,14 +263,15 @@ class IDFDUT(DUT.SerialDUT): :param: erase_nvs: whether erase NVS partition during flash :return: None """ + last_error = None for baud_rate in [921600, 115200]: try: self._try_flash(erase_nvs, baud_rate) break - except RuntimeError: - continue + except RuntimeError as e: + last_error = e else: - raise IDFToolError() + raise last_error @_uses_esptool def reset(self, esp):