index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Murphy <git@murphy-in.space> | 2023-03-10 10:45:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-10 10:45:48 +0100 |
commit | 6c879962016c5a75000d1a7971f8a020be549927 (patch) | |
tree | 66bd8f93f0a0704e2fdd98ea9dbd432356205862 /archinstall/lib | |
parent | 114e3626e2f3d5c89e21b4dbf94edd8ca5996fee (diff) |
-rw-r--r-- | archinstall/lib/disk/validators.py | 6 |
diff --git a/archinstall/lib/disk/validators.py b/archinstall/lib/disk/validators.py index 54808886..076a8ba2 100644 --- a/archinstall/lib/disk/validators.py +++ b/archinstall/lib/disk/validators.py @@ -7,10 +7,12 @@ def valid_parted_position(pos :str) -> bool: if pos.isdigit(): return True - if pos.lower().endswith('b') and pos[:-1].isdigit(): + pos_lower = pos.lower() + + if (pos_lower.endswith('b') or pos_lower.endswith('s')) and pos[:-1].isdigit(): return True - if any(pos.lower().endswith(size) and pos[:-len(size)].replace(".", "", 1).isdigit() + if any(pos_lower.endswith(size) and pos[:-len(size)].replace(".", "", 1).isdigit() for size in ['%', 'kb', 'mb', 'gb', 'tb', 'kib', 'mib', 'gib', 'tib']): return True |