pmb.flasher.frontend: Use elif instead of repeated if

Only one action can be provided through the args, so there's no point in
checking subsequent actions if a previous one has matched.

Reviewed-by: Oliver Smith <ollieparanoid@postmarketos.org>
Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230513120625.1259793-2-luca@z3ntu.xyz%3E
This commit is contained in:
Luca Weiss 2023-05-13 14:06:24 +02:00 committed by Oliver Smith
parent 6d0aa127d5
commit 071dc99f68
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
1 changed files with 7 additions and 7 deletions

View File

@ -137,17 +137,17 @@ def frontend(args):
if action in ["boot", "flash_kernel"]:
kernel(args)
if action == "flash_rootfs":
elif action == "flash_rootfs":
rootfs(args)
if action == "flash_vbmeta":
elif action == "flash_vbmeta":
flash_vbmeta(args)
if action == "flash_dtbo":
elif action == "flash_dtbo":
flash_dtbo(args)
if action == "list_flavors":
elif action == "list_flavors":
list_flavors(args)
if action == "list_devices":
elif action == "list_devices":
list_devices(args)
if action == "sideload":
elif action == "sideload":
sideload(args)
if action in ["flash_lk2nd"]:
elif action in ["flash_lk2nd"]:
flash_lk2nd(args)