From f045462c9a105b6272db4c61e8b29fc1ae059c8a Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Tue, 9 Mar 2021 11:56:33 +0100 Subject: Fixed a issue with blkid where it would raise an exception when there was not filesystem on the partition. --- archinstall/lib/disk.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'archinstall/lib') diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py index db58f3ce..3f51733a 100644 --- a/archinstall/lib/disk.py +++ b/archinstall/lib/disk.py @@ -487,6 +487,8 @@ def get_mount_info(path): return output['filesystems'][0] def get_filesystem_type(path): - if (handle := sys_command(f"blkid -o value -s TYPE {path}")).exit_code != 0: - return None - return b''.join(handle).strip().decode('UTF-8') \ No newline at end of file + try: + handle = sys_command(f"blkid -o value -s TYPE {path}") + return b''.join(handle).strip().decode('UTF-8') + except SysCallError: + return None \ No newline at end of file -- cgit v1.2.3-70-g09d2