Browse Source

fix no such method

Daniel Sheffield 1 year ago
parent
commit
d24e4057d9
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/rest/Cache.py

+ 2 - 2
app/rest/Cache.py

@@ -4,7 +4,7 @@
 #
 # THIS SOFTWARE IS PROVIDED AS IS WITHOUT WARRANTY
 import os
-import time
+from time import time
 from typing import Dict
 
 from .hash_util import blake, bytes_to_hash, hash_to_base32
@@ -41,7 +41,7 @@ def get_page(name: str, root: str = 'app/rest/static/files') -> str:
     except:
         mtime = None
     
-    if mtime and time.now() - mtime > STALE:
+    if mtime and time() - mtime > STALE:
         delete_page(name)
         return None