Skip to content

Commit f951044

Browse files
committed
filesystem: add '*.fsota' extension as valid for filesystem ota images
XCTU and XBee Studio creates filesystem images with extension '*.fsota' by default, so include this extension as a valid one. Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
1 parent d044441 commit f951044

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

digi/xbee/firmware.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@
218218
EXTENSION_EHX2 = ".ehx2"
219219
EXTENSION_OTA = ".ota"
220220
EXTENSION_OTB = ".otb"
221+
EXTENSION_FSOTA = ".fsota"
221222
EXTENSION_XML = ".xml"
222223

223224
_IMAGE_BLOCK_REQUEST_PACKET_PAYLOAD_SIZE = 17
@@ -513,8 +514,9 @@ def parse_file(self):
513514
"""
514515
_log.debug("Parsing OTA firmware file %s:", self._file_path)
515516
if (not _file_exists(self._file_path)
516-
or (not self._file_path.endswith(EXTENSION_OTA)
517-
and not self._file_path.endswith(EXTENSION_OTB))):
517+
or os.path.splitext(self._file_path)[1] not in (EXTENSION_OTA,
518+
EXTENSION_OTB,
519+
EXTENSION_FSOTA)):
518520
raise _ParsingOTAException(_ERROR_INVALID_OTA_FILE % self._file_path)
519521

520522
try:

0 commit comments

Comments
 (0)