index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Andreas Baumann <mail@andreasbaumann.cc> | 2023-04-02 13:50:24 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2023-04-02 13:50:24 +0200 |
commit | af7ab9833c9f9944874f0162ae0975175ddc628d (patch) | |
tree | c486d4948b5994125f95c8aa1d61a059c1351127 /archinstall/lib/disk/validators.py | |
parent | 2caad35a885f9be30d5bf79a47f5456f276ae67b (diff) | |
parent | 6e3c6f8863041b54f6d8cf7af37f9719c493eadd (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 |