Skip to content
Snippets Groups Projects
Commit 7ac28f96 authored by Martijn Braam's avatar Martijn Braam Committed by Oliver Smith
Browse files

pmb/flasher: Fix regression with exporting odin images (#1529)

This makes the flasher work when no flash_method attribute exists on
the args variable, which happens when it is invoked through the
pmbootstrap export --odin command. This is a regression introduced
in b29cc877

This fixes #1527
parent 08951548
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,11 @@ import pmb.helpers.mount
def init(args):
# Validate method
method = args.flash_method or args.deviceinfo["flash_method"]
if hasattr(args, 'flash_method'):
method = args.flash_method or args.deviceinfo["flash_method"]
else:
method = args.deviceinfo["flash_method"]
if method not in pmb.config.flashers:
raise RuntimeError("Flash method " + method + " is not supported by the"
" current configuration. However, adding a new flash method is "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment