Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-06-03 14:27:39 +0200
committerGitHub <noreply@github.com>2021-06-03 14:27:39 +0200
commita4033a7d3a94916f2b4972d212f9d0069fca39cd (patch)
tree4f150b6e0870e4f01af1d64ec458f3c5d5d14a5c
parent7b4564c0fc5e1ac1ed489faa757507db66d34457 (diff)
parentf1503349dabaef1d2ec721a11e997949a1959f30 (diff)
Merge pull request #546 from dylanmtaylor/patch-1
Attempt to avoid crashing when encountering swap partitions in has_content
-rw-r--r--archinstall/lib/disk.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py
index f4936d73..d0e3f6a2 100644
--- a/archinstall/lib/disk.py
+++ b/archinstall/lib/disk.py
@@ -254,7 +254,8 @@ class Partition:
return None
def has_content(self):
- if not get_filesystem_type(self.path):
+ fs_type = get_filesystem_type(self.path)
+ if not fs_type or "swap" in fs_type:
return False
temporary_mountpoint = '/tmp/' + hashlib.md5(bytes(f"{time.time()}", 'UTF-8') + os.urandom(12)).hexdigest()