Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-03-14 15:25:41 +0100
committerAnton Hvornum <anton@hvornum.se>2021-03-14 15:25:41 +0100
commit40440e575caf28d55cead7c16871e03cd9afc0c1 (patch)
tree7321514a5666236b6febf55d9d10e5a477064441 /archinstall/lib
parentb495b3328e81983e88f9ada072916d16e897910c (diff)
Added some error handling.
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/disk.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py
index 0e76cb0e..d7dfd9f4 100644
--- a/archinstall/lib/disk.py
+++ b/archinstall/lib/disk.py
@@ -193,8 +193,12 @@ class Partition():
def detect_inner_filesystem(self, password):
log(f'Trying to detect inner filesystem format on {self} (This might take a while)', level=LOG_LEVELS.Info)
from .luks import luks2
- with luks2(self, 'luksloop', password, auto_unmount=True) as unlocked_device:
- return unlocked_device.filesystem
+
+ try:
+ with luks2(self, 'luksloop', password, auto_unmount=True) as unlocked_device:
+ return unlocked_device.filesystem
+ except SysCallError:
+ return None
def has_content(self):
temporary_mountpoint = '/tmp/'+hashlib.md5(bytes(f"{time.time()}", 'UTF-8')+os.urandom(12)).hexdigest()