diff --git a/scripts/ota_updater/ota_updater.py b/scripts/ota_updater/ota_updater.py index 1db4b35b..2b0f1f5b 100755 --- a/scripts/ota_updater/ota_updater.py +++ b/scripts/ota_updater/ota_updater.py @@ -145,8 +145,10 @@ def base_topic_arg(s): args = parser.parse_args() # read the contents of firmware into buffer - firmware = args.firmware.read() + fw_buffer = args.firmware.read() args.firmware.close() + firmware = bytearray() + firmware.extend(fw_buffer) # Invoke the business logic main(args.broker_host, args.broker_port, args.broker_username,