diff options
author | Ben Sturmfels <ben@sturm.com.au> | 2019-09-16 18:08:57 +1000 |
---|---|---|
committer | Ben Sturmfels <ben@sturm.com.au> | 2019-09-16 18:08:57 +1000 |
commit | 8096beab5c605a7433cc6bfc10969a6519b98d2a (patch) | |
tree | 91a08817e5efb63d311edc1ba63358f558a41794 /mediagoblin/init/config.py | |
parent | c3096e30d51ab112e2ac28a4dea0e994ac482aad (diff) | |
download | mediagoblin-8096beab5c605a7433cc6bfc10969a6519b98d2a.tar.lz mediagoblin-8096beab5c605a7433cc6bfc10969a6519b98d2a.tar.xz mediagoblin-8096beab5c605a7433cc6bfc10969a6519b98d2a.zip |
Add Python 3 docker-compose recipe for MediaGoblin hacking.
Diffstat (limited to 'mediagoblin/init/config.py')
-rw-r--r-- | mediagoblin/init/config.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mediagoblin/init/config.py b/mediagoblin/init/config.py index fe469156..2e22083a 100644 --- a/mediagoblin/init/config.py +++ b/mediagoblin/init/config.py @@ -84,6 +84,15 @@ def read_mediagoblin_config(config_path, config_spec_path=CONFIG_SPEC_PATH): config_spec_path, encoding="UTF8", list_values=False, _inspec=True) + # HACK to get MediaGoblin running under Docker/Python 3. Without this line, + # `./bin/gmg dbupdate` fails as the configuration under 'DEFAULT' in + # config_spec still had %(here)s markers in it, when these should have been + # replaced with actual paths, resulting in + # "configobj.MissingInterpolationOption: missing option "here" in + # interpolation". This issue doesn't seem to appear when running on Guix, + # but adding this line also doesn't appear to cause problems on Guix. + _setup_defaults(config_spec, config_path) + # Set up extra defaults that will be pushed into the rest of the # configs. This is a combined extrapolation of defaults based on mainconfig_defaults = copy.copy(config_spec.get("DEFAULT", {})) |