From dd6299d6c857edc8f92c4808657082cc940ef81d Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Thu, 10 Jan 2013 11:22:21 +0100 Subject: Added default argument for check_credentials(). --- source/auth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source') diff --git a/source/auth.py b/source/auth.py index cf451e7f..3a30eefe 100755 --- a/source/auth.py +++ b/source/auth.py @@ -69,12 +69,12 @@ def change_password(username, new_password, password_file='./var/password'): cw.writerow(user) return result -def check_credentials(username, password): +def check_credentials(username, password, password_file='./var/password'): """Verifies credentials for username and password. Returns None on success or a string describing the error on failure""" # Adapt to your needs USERS = {} - cr = csv.reader(open("./var/password", "r"), 'excel_french') + cr = csv.reader(open(password_file, "r"), 'excel_french') for row in cr: USERS[row[0]] = row[1] -- cgit