fix: raise warning if swap is missing when logging swap usage

This commit is contained in:
Daniel Langbein 2023-06-21 13:22:41 +02:00
parent 8acae50b3b
commit 98e47b9a38

View File

@ -29,8 +29,7 @@ class SwapLogger(Logger):
message = f'Swap usage ist at {used_mb} MB of {total_mb} MB'
if used_mb == 0 and total_mb == 0:
# Swap not enabled.
return WarnMessage(WarnLevel.NONE)
return WarnMessage(WarnLevel.HIGH, 'Swap is not enabled')
usage = used_mb / total_mb