poltextlab's picture
swap log msgs
c92e62b verified
raw
history blame contribute delete
316 Bytes
import shutil
def is_disk_full(min_free_space_in_GB=10):
total, used, free = shutil.disk_usage("/")
free_gb = free / (1024 ** 3)
if free_gb >= min_free_space_in_GB:
print(f'enough space available ({free_gb} GB)')
return False
else:
print('clean up!')
return True