Skip to content

Commit 92a2b1c

Browse files
committed
Added a check that the proceedings directory given in the settings exists.
- Legacy-Id: 11427
1 parent df08e65 commit 92a2b1c

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

ietf/checks.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,20 @@ def check_media_directories(app_configs, **kwargs):
160160
return errors
161161

162162

163+
@checks.register('directories')
164+
def check_proceedings_directories(app_configs, **kwargs):
165+
errors = []
166+
for s in ("AGENDA_PATH", ):
167+
p = getattr(settings, s)
168+
if not os.path.exists(p):
169+
errors.append(checks.Critical(
170+
"A directory used for meeting materials does not exist at the path given\n"
171+
"in the settings file. The setting is:\n"
172+
" %s = %s" % (s, p),
173+
hint = ("Please either update the local settings to point at the correct directory,"
174+
"or if the setting is correct, create the directory."),
175+
id = "datatracker.E0013",
176+
))
177+
return errors
178+
179+

0 commit comments

Comments
 (0)