From c91210bf15710a61cd1a63f74022b27ba8141a8e Mon Sep 17 00:00:00 2001 From: Ryan Herbert Date: Wed, 19 Oct 2016 11:36:25 +0200 Subject: [PATCH] modules/vidjil_utils.py fix inverted disk space test check for available disk space test was wrong and returning the opposite of the desired result --- server/web2py/applications/vidjil/modules/vidjil_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/web2py/applications/vidjil/modules/vidjil_utils.py b/server/web2py/applications/vidjil/modules/vidjil_utils.py index 53cd8634e..2ea9c34db 100644 --- a/server/web2py/applications/vidjil/modules/vidjil_utils.py +++ b/server/web2py/applications/vidjil/modules/vidjil_utils.py @@ -418,9 +418,9 @@ def check_enough_space(directory): device, size, used, available, percent, mountpoint = output.split("\n")[1].split() available = int(available) size = int(size) - result = available < (size * (defs.FS_LOCK_THRESHHOLD/100)) if not result: mail.send(to=defs.ADMIN_EMAILS, subject="[Vidjil] Server space", message="The space in directory %s has passed below %d\%." % directory, defs.FS_LOCK_THRESHHOLD) + result = available >= (size * (defs.FS_LOCK_THRESHHOLD/100)) return result -- GitLab