Commit c261e505 authored by Likun Zhang's avatar Likun Zhang
Browse files

Change the format of the user account file.

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@631 e5f2f494-b856-4b98-b285-d166d9295462
parent ad710ab6
......@@ -21,7 +21,7 @@ class PasswordHash(object):
def check_username(name):
csvfile = open('passwd.csv')
ret = 0
reader = csv.reader(csvfile, delimiter = "\t", quoting = csv.QUOTE_MINIMAL)
reader = csv.reader(csvfile)
for row in reader:
if name == row[0]:
ret = 1
......@@ -32,7 +32,7 @@ def check_username(name):
def save_info(name,pw,salt):
csvfile = open('passwd.csv', 'a')
writer = csv.writer(csvfile, delimiter = "\t", quoting = csv.QUOTE_MINIMAL)
writer = csv.writer(csvfile)
writer.writerow([name, pw, salt])
csvfile.close()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment