pmb.flasher.variables: use getattr instead of hasattr (MR 2232)

This commit is contained in:
Andras Sebok 2024-01-18 20:57:34 +01:00 committed by Oliver Smith
parent cc50d8956b
commit 03a59287dc
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" _dtb = "-dtb"
_no_reboot = "" _no_reboot = ""
if hasattr(args,'no_reboot') and args.no_reboot: if getattr(args, 'no_reboot', False):
_no_reboot = "--no-reboot" _no_reboot = "--no-reboot"
_resume = "" _resume = ""
if hasattr(args,'resume') and args.resume: if getattr(args,'resume', False):
_resume = "--resume" _resume = "--resume"
vars = { vars = {