mirror of
https://github.com/flibusta-apps/fb2converter_server.git
synced 2025-12-06 06:55:36 +01:00
Fix remove_temp_files
This commit is contained in:
@@ -106,7 +106,11 @@ def remove_temp_files():
|
||||
|
||||
is_file = os.path.isfile(target_path)
|
||||
|
||||
creation_time = os.path.getctime(target_path)
|
||||
try:
|
||||
creation_time = os.path.getctime(target_path)
|
||||
except FileNotFoundError:
|
||||
continue
|
||||
|
||||
if (current_time - creation_time) // 3600 >= 3:
|
||||
if is_file:
|
||||
os.remove(target_path)
|
||||
|
||||
Reference in New Issue
Block a user