From c2d28063296ceeb92292d0ef87ea9cd03d625c21 Mon Sep 17 00:00:00 2001 From: correctmost <134317971+correctmost@users.noreply.github.com> Date: Sat, 31 May 2025 14:51:47 -0400 Subject: [PATCH] Remove unused context manager code from Luks2 --- archinstall/lib/luks.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/archinstall/lib/luks.py b/archinstall/lib/luks.py index c00ef5806b..e6e9dfa2d5 100644 --- a/archinstall/lib/luks.py +++ b/archinstall/lib/luks.py @@ -19,7 +19,6 @@ class Luks2: mapper_name: str | None = None password: Password | None = None key_file: Path | None = None - auto_unmount: bool = False @property def mapper_dev(self) -> Path | None: @@ -44,13 +43,6 @@ def __post_init__(self) -> None: if self.luks_dev_path is None: raise ValueError('Partition must have a path set') - def __enter__(self) -> None: - self.unlock(self.key_file) - - def __exit__(self, *args: str, **kwargs: str) -> None: - if self.auto_unmount: - self.lock() - def _password_bytes(self) -> bytes: if not self.password: raise ValueError('Password for luks2 device was not specified')