Skip to content

Commit c2d2806

Browse files
committed
Remove unused context manager code from Luks2
1 parent 55fd59d commit c2d2806

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

archinstall/lib/luks.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ class Luks2:
1919
mapper_name: str | None = None
2020
password: Password | None = None
2121
key_file: Path | None = None
22-
auto_unmount: bool = False
2322

2423
@property
2524
def mapper_dev(self) -> Path | None:
@@ -44,13 +43,6 @@ def __post_init__(self) -> None:
4443
if self.luks_dev_path is None:
4544
raise ValueError('Partition must have a path set')
4645

47-
def __enter__(self) -> None:
48-
self.unlock(self.key_file)
49-
50-
def __exit__(self, *args: str, **kwargs: str) -> None:
51-
if self.auto_unmount:
52-
self.lock()
53-
5446
def _password_bytes(self) -> bytes:
5547
if not self.password:
5648
raise ValueError('Password for luks2 device was not specified')

0 commit comments

Comments
 (0)