Wrong variable name in luks2().close()

This commit is contained in:
Anton Hvornum 2022-02-09 11:56:13 +01:00
parent c12fbc900a
commit 3129cf79f4
No known key found for this signature in database
GPG Key ID: F1234C5BA67C59DF
1 changed files with 2 additions and 3 deletions

View File

@ -205,9 +205,8 @@ class luks2:
mountpoint = self.mapdev
if mountpoint:
SysCommand(f'/usr/bin/cryptsetup close {self.mapdev}')
if not mountpoint:
SysCommand(f'/usr/bin/cryptsetup close {mountpoint}')
else:
return False
return os.path.islink(mountpoint) is False