Various changes including adding new stevens renderer.
[kiosk.git] / chooser.py
index 3514c976cb7c7149f539cefd25952d91fa97bf30..813eaffa95a404a5958183d8796ced85cf2314f0 100644 (file)
@@ -10,7 +10,7 @@ from typing import Any, Callable, List, Optional, Set, Tuple
 
 import datetime_utils
 
-import constants
+import kiosk_constants
 import trigger
 
 
@@ -29,8 +29,8 @@ class chooser(ABC):
         filenames = []
         pages = [
             f
-            for f in os.listdir(constants.pages_dir)
-            if os.path.isfile(os.path.join(constants.pages_dir, f))
+            for f in os.listdir(kiosk_constants.pages_dir)
+            if os.path.isfile(os.path.join(kiosk_constants.pages_dir, f))
         ]
         for page in pages:
             result = re.match(valid_filename, page)
@@ -38,7 +38,7 @@ class chooser(ABC):
                 if result.group(3) != "none":
                     freshness_requirement = int(result.group(3))
                     last_modified = int(
-                        os.path.getmtime(os.path.join(constants.pages_dir, page))
+                        os.path.getmtime(os.path.join(kiosk_constants.pages_dir, page))
                     )
                     age = now - last_modified
                     if age > freshness_requirement: