pmb.flasher.vars: do not assume that args.no_reboot and args.resume are defined (MR 2232)

When running pmbootstrap install --android-recovery-zip it tries to
access pmb.flasher.variables but args.no_reboot and args.resume are
only defined when running pmbootstap flasher.
This commit is contained in:
Jonas Stevnsvig 2024-01-18 15:37:02 +01:00 committed by Oliver Smith
parent 13f277a56c
commit cc50d8956b
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -63,11 +63,11 @@ def variables(args, flavor, method):
_dtb = "-dtb"
_no_reboot = ""
if args.no_reboot:
if hasattr(args,'no_reboot') and args.no_reboot:
_no_reboot = "--no-reboot"
_resume = ""
if args.resume:
if hasattr(args,'resume') and args.resume:
_resume = "--resume"
vars = {