diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2019-01-29 15:29:09 +0000 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2019-01-29 15:30:33 +0000 |
commit | e65a17b26f92a857d91e960f998a6d0b86204b9c (patch) | |
tree | 0873b190e4d71cdf3b52dd82557d2589344d6444 /synapse/rest/consent | |
parent | Do not generate self-signed TLS certificates by default. (#4509) (diff) | |
download | synapse-e65a17b26f92a857d91e960f998a6d0b86204b9c.tar.xz |
Check consent dir path on startup
Diffstat (limited to 'synapse/rest/consent')
-rw-r--r-- | synapse/rest/consent/consent_resource.py | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/synapse/rest/consent/consent_resource.py b/synapse/rest/consent/consent_resource.py index 80611cfe84..008d4edae5 100644 --- a/synapse/rest/consent/consent_resource.py +++ b/synapse/rest/consent/consent_resource.py @@ -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( |