aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2021-05-12 12:55:55 +0300
committerFilipp Lepalaan <filipp@mac.com>2021-05-12 12:55:55 +0300
commit9126b0cf6d870cdd19dee6205e212e1b04642c84 (patch)
tree3b62cbd64f599057c453724f48f5f404b848e836
parent24e2cb7f6a7b6ddb5c0676294e7d77344fb96632 (diff)
downloadServo-9126b0cf6d870cdd19dee6205e212e1b04642c84.tar.gz
Servo-9126b0cf6d870cdd19dee6205e212e1b04642c84.tar.bz2
Servo-9126b0cf6d870cdd19dee6205e212e1b04642c84.zip
python 3 fix
-rwxr-xr-xinstall.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/install.py b/install.py
index a0ccf14..c61974e 100755
--- a/install.py
+++ b/install.py
@@ -4,6 +4,7 @@ import os
import socket
import django
import requests
+from base64 import b64encode
from string import Template
from subprocess import call
from six.moves import input
@@ -27,7 +28,7 @@ args['dbpwd'] = input('4/10 DB password []: ') or ''
assert call(['createuser', args['dbuser'], '-U', args['dbadmin']]) == 0, 'Could not create DB user'
-args['secret_key'] = os.urandom(32).decode('base-64').strip()
+args['secret_key'] = b64encode(os.urandom(32)).decode('utf-8')
args['install_locale'] = input('51/10 Locale [sv_SE.UTF-8]: ') or 'sv_SE.UTF-8'
default_country = args['install_locale'].split('_')[0]
args['install_country'] = input('6/10 Country [%s]: ' % default_country) or default_country