Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2021-03-09 11:58:35 +0100
committerAnton Hvornum <anton.feeds@gmail.com>2021-03-09 11:58:35 +0100
commit251624734faa7a01590cb35b3416b72c2271ba55 (patch)
treea504cfad37dcc754beee4c3cadfea2e1f47b0570
parentf045462c9a105b6272db4c61e8b29fc1ae059c8a (diff)
Fixed luks2().close() to properly detect it's own path
-rw-r--r--archinstall/lib/luks.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/archinstall/lib/luks.py b/archinstall/lib/luks.py
index fa040788..283a1b51 100644
--- a/archinstall/lib/luks.py
+++ b/archinstall/lib/luks.py
@@ -84,7 +84,10 @@ class luks2():
if os.path.islink(f'/dev/mapper/{mountpoint}'):
return Partition(f'/dev/mapper/{mountpoint}', encrypted=True, filesystem=get_filesystem_type(f'/dev/mapper/{mountpoint}'))
- def close(self, mountpoint):
+ def close(self, mountpoint=None):
+ if not mountpoint:
+ mountpoint = self.partition.path
+
sys_command(f'cryptsetup close /dev/mapper/{mountpoint}')
return os.path.islink(f'/dev/mapper/{mountpoint}') is False