From b8def71a94bd516d1b3bc684e0db704a2d177d7a Mon Sep 17 00:00:00 2001 From: Nikolas Nyby Date: Fri, 6 Aug 2021 15:18:02 -0400 Subject: Fix some flake8 errors in cleanup and nsfw_detect Just some minor code cleanup --- cleanup.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'cleanup.py') diff --git a/cleanup.py b/cleanup.py index 09193e1..0f9a5ce 100755 --- a/cleanup.py +++ b/cleanup.py @@ -18,7 +18,10 @@ and limitations under the License. """ -import os, sys, time, datetime +import os +import sys +import time +import datetime from fhost import app os.chdir(os.path.dirname(sys.argv[0])) @@ -33,7 +36,7 @@ maxd = 365 for f in files: stat = os.stat(f) systime = time.time() - age = datetime.timedelta(seconds = systime - stat.st_mtime).days + age = datetime.timedelta(seconds=(systime - stat.st_mtime)).days maxage = mind + (-maxd + mind) * (stat.st_size / maxs - 1) ** 3 -- cgit v1.2.3