summaryrefslogtreecommitdiff
path: root/cleanup.py
diff options
context:
space:
mode:
authorNikolas Nyby <nikolas@gnu.org>2021-08-06 15:18:02 -0400
committerNikolas Nyby <nikolas@gnu.org>2021-08-06 15:19:08 -0400
commitb8def71a94bd516d1b3bc684e0db704a2d177d7a (patch)
treef9a9781216179a8240fd223d0f962a0506627630 /cleanup.py
parent47ff3a11527c13732bcf18cbe0eca4d2037f3891 (diff)
Fix some flake8 errors in cleanup and nsfw_detect
Just some minor code cleanup
Diffstat (limited to 'cleanup.py')
-rwxr-xr-xcleanup.py7
1 files changed, 5 insertions, 2 deletions
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