mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 13:46:02 -04:00
make python 3 work in the docker container
This commit is contained in:
parent
23b53b4ef8
commit
8dfb33d325
3 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue