style: apply ruff format across the tree; refresh moved-module doc refs
Bring 14 files that predated the ruff-format run into line with the configured formatter (line-length 100); provably formatting-only (ruff format of HEAD == working tree, and ruff format is semantics-preserving). Also refresh two lim.image.tor._KEYGEN_SCRIPT doc references in tor_harness.py to lim.image.initramfs.keygen after the module moved. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
12
lim/luks.py
12
lim/luks.py
@@ -40,14 +40,10 @@ def create_luks_key_and_update_crypttab(
|
||||
runner.sync_disks()
|
||||
|
||||
ui.info("Opening and closing device to verify that everything works fine...")
|
||||
closed = runner.run(
|
||||
["cryptsetup", "-v", "luksClose", mapper_name], sudo=True, check=False
|
||||
)
|
||||
closed = runner.run(["cryptsetup", "-v", "luksClose", mapper_name], sudo=True, check=False)
|
||||
if closed.returncode != 0:
|
||||
ui.info(f"No need to luksClose {mapper_name}. Device isn't open.")
|
||||
runner.run(
|
||||
["cryptsetup", "luksAddKey", partition_path, str(secret_key_path)], sudo=True
|
||||
)
|
||||
runner.run(["cryptsetup", "luksAddKey", partition_path, str(secret_key_path)], sudo=True)
|
||||
runner.run(
|
||||
[
|
||||
"cryptsetup",
|
||||
@@ -70,9 +66,7 @@ def create_luks_key_and_update_crypttab(
|
||||
print(crypttab_path.read_text())
|
||||
|
||||
|
||||
def update_fstab(
|
||||
mapper_path: str, mount_path: str, *, fstab_path: Path = FSTAB_PATH
|
||||
) -> None:
|
||||
def update_fstab(mapper_path: str, mount_path: str, *, fstab_path: Path = FSTAB_PATH) -> None:
|
||||
entry = f"{mapper_path} {mount_path} btrfs defaults 0 2"
|
||||
ui.info("Adding fstab entry...")
|
||||
fsutil.ensure_line_in_file(entry, fstab_path)
|
||||
|
||||
Reference in New Issue
Block a user