From 865baed0bbcd30fc378f2e92eb00ebc20be8dcdd Mon Sep 17 00:00:00 2001 From: Kevin Kwok Date: Fri, 14 Oct 2022 11:07:23 -0700 Subject: [PATCH] Fix FileNotFoundError in ./fbt flash_usb (#1876) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix FileNotFoundError in ./fbt flash_usb * scripts: update.py: proper fix for file naming Co-authored-by: あく Co-authored-by: hedger --- scripts/update.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/update.py b/scripts/update.py index 6be1dce0..3259c5b0 100755 --- a/scripts/update.py +++ b/scripts/update.py @@ -78,8 +78,12 @@ class Main(App): def generate(self): stage_basename = "updater.bin" # used to be basename(self.args.stage) - dfu_basename = "firmware.dfu" # used to be basename(self.args.dfu) - radiobin_basename = "radio.bin" # used to be basename(self.args.radiobin) + dfu_basename = ( + "firmware.dfu" if self.args.dfu else "" + ) # used to be basename(self.args.dfu) + radiobin_basename = ( + "radio.bin" if self.args.radiobin else "" + ) # used to be basename(self.args.radiobin) resources_basename = "" radio_version = 0