diff options
| author | Nikolas Nyby <nikolas@gnu.org> | 2021-08-06 15:18:02 -0400 |
|---|---|---|
| committer | Nikolas Nyby <nikolas@gnu.org> | 2021-08-06 15:19:08 -0400 |
| commit | b8def71a94bd516d1b3bc684e0db704a2d177d7a (patch) | |
| tree | f9a9781216179a8240fd223d0f962a0506627630 /cleanup.py | |
| parent | 47ff3a11527c13732bcf18cbe0eca4d2037f3891 (diff) | |
Fix some flake8 errors in cleanup and nsfw_detect
Just some minor code cleanup
Diffstat (limited to 'cleanup.py')
| -rwxr-xr-x | cleanup.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 |
