forked from espressif/esp-idf
otatool: let fail early on exception
otatool gives a 'target has no otadata' error instead of the real cause (because of wrong port specified, for example)
This commit is contained in:
@@ -63,8 +63,6 @@ class OtatoolTarget():
|
|||||||
self.target.read_partition(OtatoolTarget.OTADATA_PARTITION, temp_file.name)
|
self.target.read_partition(OtatoolTarget.OTADATA_PARTITION, temp_file.name)
|
||||||
with open(temp_file.name, "rb") as f:
|
with open(temp_file.name, "rb") as f:
|
||||||
self.otadata = f.read()
|
self.otadata = f.read()
|
||||||
except Exception:
|
|
||||||
self.otadata = None
|
|
||||||
finally:
|
finally:
|
||||||
os.unlink(temp_file.name)
|
os.unlink(temp_file.name)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user