Update partitioning.py

This commit is contained in:
2026-02-03 21:31:17 +01:00
parent bb31814233
commit b70ff549a7

View File

@@ -43,7 +43,6 @@ CSS = """
def get_total_memory() -> int: def get_total_memory() -> int:
"""Returns total system memory in bytes."""
try: try:
return os.sysconf("SC_PAGE_SIZE") * os.sysconf("SC_PHYS_PAGES") return os.sysconf("SC_PAGE_SIZE") * os.sysconf("SC_PHYS_PAGES")
except (ValueError, OSError): except (ValueError, OSError):
@@ -54,7 +53,8 @@ def get_total_memory() -> int:
return int(parts[1]) * 1024 return int(parts[1]) * 1024
return 0 return 0
def calculate_auto_partitions(disk_device):
def calculate_auto_partitions(disk_device):
disk_size = 0 disk_size = 0
try: try:
# Get disk size in bytes # Get disk size in bytes