summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMichaël Ball <michael.ball@gmail.com>2017-03-26 10:19:59 +0100
committerMichaël Ball <michael.ball@gmail.com>2017-06-04 07:37:53 +0100
commitd06f96388d754ed41876f7fccb63f84241d44963 (patch)
tree640a4f3eaf7e1f2b76a246a1977c27775d0b59a1 /common
parentcaa1c3ccdf94ee20140b3964aab0ad3058e03699 (diff)
Works on python 2/pypy
Diffstat (limited to 'common')
-rw-r--r--common/security.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/common/security.py b/common/security.py
index 91acb2b..e3ab5de 100644
--- a/common/security.py
+++ b/common/security.py
@@ -1,12 +1,10 @@
-import configparser
-
from passlib.context import CryptContext
-
+from six.moves import configparser
config = configparser.ConfigParser()
config.read("mach2.ini")
-secret_key = config["DEFAULT"]["secret_key"]
+secret_key = config.get("DEFAULT", "secret_key")
pwd_context = CryptContext(
schemes=["pbkdf2_sha256", "des_crypt"],