Skip to content

Commit

Permalink
indentation: keep each condition on a separate line
Browse files Browse the repository at this point in the history
We would have two conditions joined by 'and', and we would have
the first operand and half of the second on the first line, and
the remainder of the second operand on multiple lines.
  • Loading branch information
keszybz committed Sep 20, 2021
1 parent cc3289e commit f67f59e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mkosi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -826,9 +826,9 @@ def mkfs_generic(args: CommandLineArguments, label: str, mount: PathString, dev:
cmdline = mkfs_ext4_cmd(label, mount)

if args.output_format == OutputFormat.gpt_ext4:
if args.distribution in (Distribution.centos, Distribution.centos_epel) and is_older_than_centos8(
args.release
):
if (args.distribution in (Distribution.centos, Distribution.centos_epel) and
is_older_than_centos8(args.release)):

# e2fsprogs in centos7 is too old and doesn't support this feature
cmdline += ["-O", "^metadata_csum"]

Expand Down Expand Up @@ -2979,9 +2979,8 @@ def install_boot_loader(
if args.get_partition('esp'):
if args.distribution == Distribution.clear:
pass
elif args.distribution in (Distribution.centos, Distribution.centos_epel) and is_older_than_centos8(
args.release
):
elif (args.distribution in (Distribution.centos, Distribution.centos_epel) and
is_older_than_centos8(args.release)):
install_boot_loader_centos_old_efi(args, root, loopdev)
else:
run_workspace_command(args, root, ["bootctl", "install"])
Expand Down Expand Up @@ -3564,7 +3563,8 @@ def insert_verity_sig(
assert fingerprint is not None
assert args.partition_table is not None

# Hash the concatenation of verity roothash and the X509 certificate fingerprint to generate a UUID for the signature partition
# Hash the concatenation of verity roothash and the X509 certificate
# fingerprint to generate a UUID for the signature partition.
u = uuid.UUID(hashlib.sha256(bytes.fromhex(root_hash) + bytes.fromhex(fingerprint)).hexdigest()[:32])

with complete_step("Inserting verity signature partition…"):
Expand Down

0 comments on commit f67f59e

Please sign in to comment.