comparison bitsyblog/user.py @ 132:bda88f101ba9

py3
author Jeff Hammel <k0scist@gmail.com>
date Mon, 28 Dec 2020 20:49:32 +0000
parents c4a8285f9875
children ce478807848e
comparison
equal deleted inserted replaced
131:2d944e8f24e9 132:bda88f101ba9
159 159
160 def password(self, user): 160 def password(self, user):
161 pw_file = '.password' # name of the password file on the filesystem 161 pw_file = '.password' # name of the password file on the filesystem
162 password = self.home(user, pw_file) 162 password = self.home(user, pw_file)
163 if os.path.exists(password): 163 if os.path.exists(password):
164 return file(password).read().strip() 164 return open(password).read().strip()
165 return '' # unspecified password 165 return '' # unspecified password
166 166
167 def settings(self, name): 167 def settings(self, name):
168 """returns a dictionary of user preferences from a file""" 168 """returns a dictionary of user preferences from a file"""
169 169