index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2021-05-12 10:58:46 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-12 10:58:46 +0000 |
commit | df6c4e77f721da2b03a510548d281992b25987b2 (patch) | |
tree | fc5556c89356cf19140c236d64ba34a368565e63 /archinstall/lib/disk.py | |
parent | 0ef8cc579eba15803f542947c56a15ab9807b09c (diff) | |
parent | af3d65cc98632042b3b0ef62cfc27553261ec3b0 (diff) |
-rw-r--r-- | archinstall/lib/disk.py | 5 |
diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py index 44462a21..fd08ea63 100644 --- a/archinstall/lib/disk.py +++ b/archinstall/lib/disk.py @@ -1,3 +1,4 @@ +from typing import Optional import glob, re, os, json, time, hashlib import pathlib, traceback, logging from collections import OrderedDict @@ -205,7 +206,7 @@ class Partition(): return f'Partition(path={self.path}, size={self.size}, fs={self.filesystem}{mount_repr})' @property - def uuid(self) -> str: + def uuid(self) -> Optional[str]: """ Returns the PARTUUID as returned by lsblk. This is more reliable than relying on /dev/disk/by-partuuid as @@ -214,7 +215,7 @@ class Partition(): lsblk = b''.join(sys_command(f'lsblk -J -o+PARTUUID {self.path}')) for partition in json.loads(lsblk.decode('UTF-8'))['blockdevices']: return partition.get('partuuid', None) - + return None @property def encrypted(self): return self._encrypted |