Open the file for appending. See

- Legacy-Id: 3589
This commit is contained in:
Emilio A. Sánchez López 2011-11-03 18:34:35 +00:00
parent 7207329b0b
commit c1ca982ec4

View file

@ -116,7 +116,7 @@ class PasswordForm(forms.Form):
username = self.username
prefix = '%s:%s:' % (username, realm)
key = hashlib.md5(prefix + password).hexdigest()
f = open(pass_file, 'w+')
f = open(pass_file, 'a+')
f.write('%s%s\n' % (prefix, key))
f.close()
else: