From d398793a759acc1d8bf2484f3533d0e9744bd429 Mon Sep 17 00:00:00 2001 From: Marius Halden Date: Mon, 17 Mar 2014 19:10:00 +0100 Subject: Chaged where the configfile is defined and how the config is used --- ddns/auth.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'ddns/auth.py') diff --git a/ddns/auth.py b/ddns/auth.py index 6624aad..030d239 100644 --- a/ddns/auth.py +++ b/ddns/auth.py @@ -4,10 +4,8 @@ from functools import wraps import ddns.cfg_parser import hash -auth_cfg = ddns.cfg_parser.cfg['users'] - def check_auth(username, password): - for user in auth_cfg: + for user in ddns.cfg_parser.cfg.get('users'): if username == user['username'] and \ hash.hash(user['hash'], password) == user['password']: return True -- cgit v1.2.3