Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-03-29 07:35:04 +0000
committerGitHub <noreply@github.com>2021-03-29 07:35:04 +0000
commit5e3a1523644abe3dc0c06ff17dbaeafb5a3cbda4 (patch)
treee9556862c88a43d88ba2f18ddfcd187285baedb4 /archinstall
parent6cba404b75abb3faa939c8d6c7e29610591f3cc3 (diff)
parented565e13481cce7ac3b640f0ad933605f6ad63c3 (diff)
Merge pull request #121 from Torxed/torxed-v2.2.3
Torxed v2.2.3
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/lib/disk.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py
index c1db3dc9..9afece2e 100644
--- a/archinstall/lib/disk.py
+++ b/archinstall/lib/disk.py
@@ -142,7 +142,8 @@ class Partition():
self.target_mountpoint = mountpoint
self.filesystem = filesystem
self.size = size # TODO: Refresh?
- self._encrypted = encrypted
+ self._encrypted = None
+ self.encrypted = encrypted
self.allow_formatting = False # A fail-safe for unconfigured partitions, such as windows NTFS partitions.
if mountpoint:
@@ -161,7 +162,7 @@ class Partition():
self.filesystem = fstype
if self.filesystem == 'crypto_LUKS':
- self._encrypted = True
+ self.encrypted = True
def __lt__(self, left_comparitor):
if type(left_comparitor) == Partition:
@@ -269,6 +270,11 @@ class Partition():
if allow_formatting is None:
allow_formatting = self.allow_formatting
+ # To avoid "unable to open /dev/x: No such file or directory"
+ start_wait = time.time()
+ while pathlib.Path(path).exists() is False and time.time() - start_wait < 10:
+ time.sleep(0.025)
+
if not allow_formatting:
raise PermissionError(f"{self} is not formatable either because instance is locked ({self.allow_formatting}) or a blocking flag was given ({allow_formatting})")