Merge pull request #1497 from Salamandar/patch-1

tools_postinstall: list all partitions (not only physical ones)
This commit is contained in:
Alexandre Aubin 2022-08-27 15:50:24 +02:00 committed by GitHub
commit 66d416a37a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -219,7 +219,7 @@ def tools_postinstall(
) )
# Check there's at least 10 GB on the rootfs... # Check there's at least 10 GB on the rootfs...
disk_partitions = sorted(psutil.disk_partitions(), key=lambda k: k.mountpoint) disk_partitions = sorted(psutil.disk_partitions(all=True), key=lambda k: k.mountpoint)
main_disk_partitions = [d for d in disk_partitions if d.mountpoint in ["/", "/var"]] main_disk_partitions = [d for d in disk_partitions if d.mountpoint in ["/", "/var"]]
main_space = sum( main_space = sum(
psutil.disk_usage(d.mountpoint).total for d in main_disk_partitions psutil.disk_usage(d.mountpoint).total for d in main_disk_partitions