From 92a2b1cbe0bc5545afea03b0a43b676766dcf6e3 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz <henrik@levkowetz.com> Date: Mon, 20 Jun 2016 21:51:14 +0000 Subject: [PATCH] Added a check that the proceedings directory given in the settings exists. - Legacy-Id: 11427 --- ietf/checks.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ietf/checks.py b/ietf/checks.py index 290f07ef1..c705ee52d 100644 --- a/ietf/checks.py +++ b/ietf/checks.py @@ -160,3 +160,20 @@ def check_media_directories(app_configs, **kwargs): return errors +@checks.register('directories') +def check_proceedings_directories(app_configs, **kwargs): + errors = [] + for s in ("AGENDA_PATH", ): + p = getattr(settings, s) + if not os.path.exists(p): + errors.append(checks.Critical( + "A directory used for meeting materials does not exist at the path given\n" + "in the settings file. The setting is:\n" + " %s = %s" % (s, p), + hint = ("Please either update the local settings to point at the correct directory," + "or if the setting is correct, create the directory."), + id = "datatracker.E0013", + )) + return errors + +