@@ -67,3 +67,34 @@ def check_doc_email_aliases_exists(app_configs, **kwargs):
6767
6868 return errors
6969
70+ @checks .register ('directories' )
71+ def check_id_submission_directories (app_configs , ** kwargs ):
72+ errors = []
73+ for s in ("IDSUBMIT_STAGING_PATH" , "IDSUBMIT_REPOSITORY_PATH" , "INTERNET_DRAFT_ARCHIVE_DIR" ):
74+ p = getattr (settings , s )
75+ if not os .path .exists (p ):
76+ errors .append (checks .Critical (
77+ "A directory used by the ID submission tool does not exist at the path given\n "
78+ "in the settings file. The setting is:\n "
79+ " %s = %s" % (s , p ),
80+ hint = ("Please either update the local settings to point at the correct directory,"
81+ "or if the setting is correct, create the directory." ),
82+ id = "datatracker.E0006" ,
83+ ))
84+ return errors
85+
86+ @checks .register ('files' )
87+ def check_id_submission_files (app_configs , ** kwargs ):
88+ errors = []
89+ for s in ("IDSUBMIT_IDNITS_BINARY" , ):
90+ p = getattr (settings , s )
91+ if not os .path .exists (p ):
92+ errors .append (checks .Critical (
93+ "A file used by the ID submission tool does not exist at the path given\n "
94+ "in the settings file. The setting is:\n "
95+ " %s = %s" % (s , p ),
96+ hint = ("Please either update the local settings to point at the correct file,"
97+ "or if the setting is correct, make sure the file is in place and has the right permissions." ),
98+ id = "datatracker.E0007" ,
99+ ))
100+ return errors
0 commit comments