[bootloader] make if statement more pythonic

This commit is contained in:
Philip 2015-02-19 19:46:57 +01:00
parent b41ecf119d
commit 229b9b40cd

View File

@ -144,7 +144,7 @@ def install_bootloader(boot_loader, fw_type):
boot_device = partition["device"]
boot_p = boot_device[-1:]
device = boot_device[:-1]
if (boot_p == "" or device == ""):
if (not boot_p or not device):
return ("EFI directory \"{!s}\" not found!",
"Boot partition: \"{!s}\"",
"Boot device: \"{!s}\"".format(efi_directory,boot_p,device))