From 7301cd7eeb12dff144a2979caa19cf3052265f68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Diemer?= <stephane.diemer@ubicast.eu> Date: Tue, 12 Mar 2019 15:44:48 +0100 Subject: [PATCH] Fixed wrong unallocated space warning. --- tests/test_partitions.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_partitions.py b/tests/test_partitions.py index 4b7d32c1..9be85960 100755 --- a/tests/test_partitions.py +++ b/tests/test_partitions.py @@ -92,12 +92,14 @@ def check_allocation(dev): size = int(blocks) * 512 if name == root_dev: max_size = size + if root_dev.startswith('md'): + total_size += size else: total_size += size unallocated = max_size - total_size unallocated_gbytes = to_gbytes(unallocated) if unallocated_gbytes > 1: - print('Warning, %s GB are unallocated on %s.' % (unallocated_gbytes, root_dev)) + print('Warning: %s%s GB are unallocated on %s.%s' % (YELLOW, unallocated_gbytes, root_dev, DEF)) return False return True -- GitLab