mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 12:54:53 -04:00
Check consent dir path on startup
This commit is contained in:
parent
6bd4374636
commit
e65a17b26f
2 changed files with 14 additions and 11 deletions
|
@ -101,16 +101,7 @@ class ConsentResource(Resource):
|
|||
"missing in config file.",
|
||||
)
|
||||
|
||||
# daemonize changes the cwd to /, so make the path absolute now.
|
||||
consent_template_directory = path.abspath(
|
||||
hs.config.user_consent_template_dir,
|
||||
)
|
||||
if not path.isdir(consent_template_directory):
|
||||
raise ConfigError(
|
||||
"Could not find template directory '%s'" % (
|
||||
consent_template_directory,
|
||||
),
|
||||
)
|
||||
consent_template_directory = hs.config.user_consent_template_dir
|
||||
|
||||
loader = jinja2.FileSystemLoader(consent_template_directory)
|
||||
self._jinja_env = jinja2.Environment(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue