From c9ebba355f7a06da30a8aafc94dad65ff7d7b435 Mon Sep 17 00:00:00 2001 From: KonstantinKondrashov Date: Tue, 23 Mar 2021 21:38:04 +0800 Subject: [PATCH] otatool: Fix a crash when imported as external python lib Closes: https://github.com/espressif/esp-idf/issues/6733 --- components/app_update/otatool.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/components/app_update/otatool.py b/components/app_update/otatool.py index d90c705957..3dcb71a41e 100755 --- a/components/app_update/otatool.py +++ b/components/app_update/otatool.py @@ -31,7 +31,6 @@ try: except ImportError: COMPONENTS_PATH = os.path.expandvars(os.path.join('$IDF_PATH', 'components')) PARTTOOL_DIR = os.path.join(COMPONENTS_PATH, 'partition_table') - sys.path.append(PARTTOOL_DIR) from parttool import PARTITION_TABLE_OFFSET, PartitionName, PartitionType, ParttoolTarget @@ -101,7 +100,6 @@ class OtatoolTarget(): def switch_ota_partition(self, ota_id): self._check_otadata_partition() - sys.path.append(PARTTOOL_DIR) import gen_esp32part as gen def is_otadata_info_valid(status):