+class UserHandler(Handler):
+
+ def __init__(self, users):
+ self.users = users
+
+ def add(self, user, password):
+ if user in self.users:
+ raise UserAlreadyExistsError(user)
+ self.users[user] = crypt.crypt(password,'BA')
+
+ def delete(self, user):
+ if not user in self.users:
+ raise UserNotFound(user)
+ del self.users[user]
+