Fix FileNotFoundError in ./fbt flash_usb (#1876)

* Fix FileNotFoundError in ./fbt flash_usb
* scripts: update.py: proper fix for file naming

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: hedger <hedger@nanode.su>
This commit is contained in:
Kevin Kwok 2022-10-14 11:07:23 -07:00 committed by GitHub
parent f81999ea4a
commit 865baed0bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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