Browse Source

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

algooapy 7 years ago
parent
commit
c23cc129aa
1 changed files with 5 additions and 0 deletions
  1. 5 0
      tracim/tracim/config/app_cfg.py

+ 5 - 0
tracim/tracim/config/app_cfg.py View File

230
         self.PREVIEW_CACHE_DIR = tg.config.get(
230
         self.PREVIEW_CACHE_DIR = tg.config.get(
231
             'preview_cache_dir',
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
         self.DATA_UPDATE_ALLOWED_DURATION = int(tg.config.get(
239
         self.DATA_UPDATE_ALLOWED_DURATION = int(tg.config.get(
235
             'content.update.allowed.duration',
240
             'content.update.allowed.duration',