aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-01-10 11:22:21 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-01-10 11:22:21 +0100
commitdd6299d6c857edc8f92c4808657082cc940ef81d (patch)
tree7c84fc5af249badce30d399c45c71d243bcefe83 /source
parentAdded change_password function in order to change the password corresponding ... (diff)
downloadnewspipe-dd6299d6c857edc8f92c4808657082cc940ef81d.tar.gz
newspipe-dd6299d6c857edc8f92c4808657082cc940ef81d.tar.bz2
newspipe-dd6299d6c857edc8f92c4808657082cc940ef81d.zip
Added default argument for check_credentials().
Diffstat (limited to 'source')
-rwxr-xr-xsource/auth.py4
1 files changed, 2 insertions, 2 deletions
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]
bgstack15