diff options
author | Richard van der Hoff <richard@matrix.org> | 2019-06-21 23:39:08 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2019-06-24 14:14:52 +0100 |
commit | 7c2f8881a955a509a4137119128974c4a58a9b88 (patch) | |
tree | 3d7c1964d9bfafe49020c80f60692dc7a3095409 /synapse/config/repository.py | |
parent | Merge pull request #5516 from matrix-org/rav/acme_key_path (diff) | |
download | synapse-7c2f8881a955a509a4137119128974c4a58a9b88.tar.xz |
Ensure that all config options have sensible defaults
This will enable us to skip the unintuitive behaviour where the generated config and default config are the same thing.
Diffstat (limited to 'synapse/config/repository.py')
-rw-r--r-- | synapse/config/repository.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/config/repository.py b/synapse/config/repository.py index 15a19e0911..43e6c4921f 100644 --- a/synapse/config/repository.py +++ b/synapse/config/repository.py @@ -91,7 +91,9 @@ class ContentRepositoryConfig(Config): self.max_image_pixels = self.parse_size(config.get("max_image_pixels", "32M")) self.max_spider_size = self.parse_size(config.get("max_spider_size", "10M")) - self.media_store_path = self.ensure_directory(config["media_store_path"]) + self.media_store_path = self.ensure_directory( + config.get("media_store_path", "media_store") + ) backup_media_store_path = config.get("backup_media_store_path") @@ -148,7 +150,7 @@ class ContentRepositoryConfig(Config): (provider_class, parsed_config, wrapper_config) ) - self.uploads_path = self.ensure_directory(config["uploads_path"]) + self.uploads_path = self.ensure_directory(config.get("uploads_path", "uploads")) self.dynamic_thumbnails = config.get("dynamic_thumbnails", False) self.thumbnail_requirements = parse_thumbnail_requirements( config.get("thumbnail_sizes", DEFAULT_THUMBNAIL_SIZES) |