Append a new line when initially creating auth file

This commit is contained in:
Andrew Resch 2009-02-10 09:10:14 +00:00
parent be68515fdc
commit b8a8a37571
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ class AuthManager(component.Component):
from hashlib import sha1 as sha_hash from hashlib import sha1 as sha_hash
except ImportError: except ImportError:
from sha import new as sha_hash from sha import new as sha_hash
open(auth_file, "w").write("localclient:" + sha_hash(str(random.random())).hexdigest() + ":" + str(AUTH_LEVEL_ADMIN)) open(auth_file, "w").write("localclient:" + sha_hash(str(random.random())).hexdigest() + ":" + str(AUTH_LEVEL_ADMIN) + "\n")
# Change the permissions on the file so only this user can read/write it # Change the permissions on the file so only this user can read/write it
os.chmod(auth_file, stat.S_IREAD | stat.S_IWRITE) os.chmod(auth_file, stat.S_IREAD | stat.S_IWRITE)