From c7820b87e0da4b350221f96bac9a4083735c5b32 Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Sat, 10 Apr 2010 00:19:01 +0200 Subject: [PATCH] Set constant values after defining functions in htpasswd module. --- radicale/acl/htpasswd.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/radicale/acl/htpasswd.py b/radicale/acl/htpasswd.py index 239dfa4..0933e30 100644 --- a/radicale/acl/htpasswd.py +++ b/radicale/acl/htpasswd.py @@ -33,10 +33,6 @@ import hashlib from radicale import config -FILENAME = config.get("acl", "filename") -CHECK_PASSWORD = locals()["_%s" % config.get("acl", "encryption")] - - def _plain(hash_value, password): """Check if ``hash_value`` and ``password`` match using plain method.""" return hash_value == password @@ -66,3 +62,7 @@ def has_right(user, password): if login == user: return CHECK_PASSWORD(hash_value, password) return False + + +FILENAME = config.get("acl", "filename") +CHECK_PASSWORD = locals()["_%s" % config.get("acl", "encryption")]