diff options
author | Michaël Ball <michael.ball@gmail.com> | 2017-03-26 10:19:59 +0100 |
---|---|---|
committer | Michaël Ball <michael.ball@gmail.com> | 2017-06-04 07:37:53 +0100 |
commit | d06f96388d754ed41876f7fccb63f84241d44963 (patch) | |
tree | 640a4f3eaf7e1f2b76a246a1977c27775d0b59a1 /common/security.py | |
parent | caa1c3ccdf94ee20140b3964aab0ad3058e03699 (diff) |
Works on python 2/pypy
Diffstat (limited to 'common/security.py')
-rw-r--r-- | common/security.py | 6 |
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"], |