def adduser(self, user): """Add a user to the environment. Password is the username.""" with open(self.htpasswd, 'a') as f: f.write('%s:%s\n' % (user, mkhtpasswd(user)))
def userline(self, user, password): return self.prefix(user) + mkhtpasswd(password, self.hash_type)