Hendrik Schroeter commited on
Commit
1316b18
1 Parent(s): 63cd8f7

try fix filter

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -258,7 +258,8 @@ def cleanup_tmp(filter: List[str] = [], hours_keep=2):
258
  if os.path.exists("/tmp"):
259
  for f in glob.glob("/tmp/*"):
260
  is_old = (time.time() - os.path.getmtime(f)) / 3600 > hours_keep
261
- filtered = any(filt in f for filt in filter)
 
262
  if is_old and not filtered:
263
  try:
264
  os.remove(f)
 
258
  if os.path.exists("/tmp"):
259
  for f in glob.glob("/tmp/*"):
260
  is_old = (time.time() - os.path.getmtime(f)) / 3600 > hours_keep
261
+ print(f"got filter {filter}")
262
+ filtered = any(filt in f for filt in filter if filt is not None)
263
  if is_old and not filtered:
264
  try:
265
  os.remove(f)