Skip to content

Commit d159e7a

Browse files
committed
tools: ota_upgrade: don't exit on failing time set
Don't exit the program if the time set fails. Instead terminate the connection and continue scanning for other devices. Signed-off-by: Jordan Yates <jordan@embeint.com>
1 parent 8fc1e04 commit d159e7a

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/infuse_iot/tools/ota_upgrade.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -324,12 +324,12 @@ def run(self):
324324
source.infuse_id, GatewayRequestConnectionRequest.DataType.COMMAND, self._conn_timeout
325325
) as mtu:
326326
# Set time on the remote device to keep keys in sync
327-
if not self.set_device_time(mtu, source.infuse_id):
328-
break
329-
if self._single_diff:
330-
self.run_file_copy(live, mtu, source)
331-
else:
332-
self.run_file_upload(live, mtu, source)
327+
if self.set_device_time(mtu, source.infuse_id):
328+
# Upload the patch file
329+
if self._single_diff:
330+
self.run_file_copy(live, mtu, source)
331+
else:
332+
self.run_file_upload(live, mtu, source)
333333

334334
except ConnectionRefusedError:
335335
self.state_update(live, "Scanning")

0 commit comments

Comments
 (0)