Python-style: follow-up to PR 735, remove non-idiomatic use of 'is'

This commit is contained in:
Adriaan de Groot 2017-06-04 11:37:12 +02:00
parent 084e304c07
commit 3804e4df68

View File

@ -132,16 +132,16 @@ def modify_mkinitcpio_conf(partitions, root_mount_point):
): ):
files.append("/crypto_keyfile.bin") files.append("/crypto_keyfile.bin")
if swap_uuid is not "": if swap_uuid != "":
if encrypt_hook and openswap_hook: if encrypt_hook and openswap_hook:
hooks.extend(["openswap"]) hooks.extend(["openswap"])
hooks.extend(["resume", "filesystems"]) hooks.extend(["resume", "filesystems"])
else: else:
hooks.extend(["filesystems"]) hooks.extend(["filesystems"])
if btrfs is "yes" and cpu['proc0']['vendor_id'].lower() != "genuineintel": if btrfs == "yes" and cpu['proc0']['vendor_id'].lower() != "genuineintel":
modules.append("crc32c") modules.append("crc32c")
elif (btrfs is "yes" elif (btrfs == "yes"
and cpu['proc0']['vendor_id'].lower() == "genuineintel"): and cpu['proc0']['vendor_id'].lower() == "genuineintel"):
modules.append("crc32c-intel") modules.append("crc32c-intel")
else: else: