diff options
author | Richard van der Hoff <richard@matrix.org> | 2018-09-26 12:55:53 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2018-09-26 12:55:53 +0100 |
commit | 5b4028fa787a00e19f1e7003807c5702a29816cd (patch) | |
tree | f2cf93ce5ef2105c2fec21da10786d3d9ae28130 /docker/start.py | |
parent | Merge remote-tracking branch 'origin/develop' into erikj/destination_retry_cache (diff) | |
parent | Log which cache is throwing exceptions (diff) | |
download | synapse-5b4028fa787a00e19f1e7003807c5702a29816cd.tar.xz |
Merge branch 'rav/fix_expiring_cache_len' into erikj/destination_retry_cache
Diffstat (limited to 'docker/start.py')
-rwxr-xr-x | docker/start.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/docker/start.py b/docker/start.py index 90e8b9c51a..346df8c87f 100755 --- a/docker/start.py +++ b/docker/start.py @@ -5,6 +5,7 @@ import os import sys import subprocess import glob +import codecs # Utility functions convert = lambda src, dst, environ: open(dst, "w").write(jinja2.Template(open(src).read()).render(**environ)) @@ -23,7 +24,7 @@ def generate_secrets(environ, secrets): with open(filename) as handle: value = handle.read() else: print("Generating a random secret for {}".format(name)) - value = os.urandom(32).encode("hex") + value = codecs.encode(os.urandom(32), "hex").decode() with open(filename, "w") as handle: handle.write(value) environ[secret] = value |