Fix some flake8 errors in cleanup and nsfw_detect
Just some minor code cleanup
This commit is contained in:
parent
47ff3a1152
commit
b8def71a94
2 changed files with 30 additions and 14 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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue