From d06f96388d754ed41876f7fccb63f84241d44963 Mon Sep 17 00:00:00 2001 From: Michaƫl Ball Date: Sun, 26 Mar 2017 10:19:59 +0100 Subject: Works on python 2/pypy --- common/security.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'common/security.py') 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"], -- cgit v1.2.3