def post(self, *args):
        if not self.api_key.can_create_user():
            raise HTTPError(403)

        try:
            username, password, user_type, key, extra = self.fetch_user()
        except __HOLE__:
            raise HTTPError(400)

        try:
            self.auth_mgr.create_user(username, password, user_type=user_type,
                    key=key, extra=extra)
        except UserConflict:
            raise HTTPError(409)

        self.write({"ok": True})
dataset/ETHPy150Open benoitc/gaffer/gaffer/gafferd/http_handlers/user.py/UsersHandler.post