Przeglądaj źródła

Raises exception if no preview cache dir in conf (#323)

algooapy 7 lat temu
rodzic
commit
c23cc129aa
1 zmienionych plików z 5 dodań i 0 usunięć
  1. 5 0
      tracim/tracim/config/app_cfg.py

+ 5 - 0
tracim/tracim/config/app_cfg.py Wyświetl plik

@@ -230,6 +230,11 @@ class CFG(object):
230 230
         self.PREVIEW_CACHE_DIR = tg.config.get(
231 231
             'preview_cache_dir',
232 232
         )
233
+        if not self.PREVIEW_CACHE_DIR:
234
+            raise Exception(
235
+                'ERROR: preview_cache_dir configuration is mandatory. '
236
+                'Set it before continuing.'
237
+            )
233 238
 
234 239
         self.DATA_UPDATE_ALLOWED_DURATION = int(tg.config.get(
235 240
             'content.update.allowed.duration',