mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
otatool: Fix a crash when imported as external python lib
Closes: https://github.com/espressif/esp-idf/issues/6733
This commit is contained in:
committed by
bot
parent
1f7172dbf9
commit
c9ebba355f
@@ -31,7 +31,6 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
COMPONENTS_PATH = os.path.expandvars(os.path.join('$IDF_PATH', 'components'))
|
COMPONENTS_PATH = os.path.expandvars(os.path.join('$IDF_PATH', 'components'))
|
||||||
PARTTOOL_DIR = os.path.join(COMPONENTS_PATH, 'partition_table')
|
PARTTOOL_DIR = os.path.join(COMPONENTS_PATH, 'partition_table')
|
||||||
|
|
||||||
sys.path.append(PARTTOOL_DIR)
|
sys.path.append(PARTTOOL_DIR)
|
||||||
from parttool import PARTITION_TABLE_OFFSET, PartitionName, PartitionType, ParttoolTarget
|
from parttool import PARTITION_TABLE_OFFSET, PartitionName, PartitionType, ParttoolTarget
|
||||||
|
|
||||||
@@ -101,7 +100,6 @@ class OtatoolTarget():
|
|||||||
def switch_ota_partition(self, ota_id):
|
def switch_ota_partition(self, ota_id):
|
||||||
self._check_otadata_partition()
|
self._check_otadata_partition()
|
||||||
|
|
||||||
sys.path.append(PARTTOOL_DIR)
|
|
||||||
import gen_esp32part as gen
|
import gen_esp32part as gen
|
||||||
|
|
||||||
def is_otadata_info_valid(status):
|
def is_otadata_info_valid(status):
|
||||||
|
Reference in New Issue
Block a user