diff --git a/pmb/flasher/init.py b/pmb/flasher/init.py index f9f6b548..511cc2e5 100644 --- a/pmb/flasher/init.py +++ b/pmb/flasher/init.py @@ -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 "