diff -r 5c931bd3dc1e -r a7766286a7be thirdparty/google_appengine/google/appengine/api/users.py --- a/thirdparty/google_appengine/google/appengine/api/users.py Thu Feb 12 10:24:37 2009 +0000 +++ b/thirdparty/google_appengine/google/appengine/api/users.py Thu Feb 12 12:30:36 2009 +0000 @@ -20,9 +20,9 @@ Classes defined here: User: object representing a user. Error: base exception type - BadRequestError: UserService exception UserNotFoundError: UserService exception - BackendError: UserService exception + RedirectTooLongError: UserService exception + NotAllowedError: UserService exception """ @@ -50,6 +50,10 @@ """Raised by UserService calls if the generated redirect URL was too long. """ +class NotAllowedError(Error): + """Raised by UserService calls if the requested redirect URL is not allowed. + """ + class User(object): """A user. @@ -147,6 +151,9 @@ if (e.application_error == user_service_pb.UserServiceError.REDIRECT_URL_TOO_LONG): raise RedirectTooLongError + elif (e.application_error == + user_service_pb.UserServiceError.NOT_ALLOWED): + raise NotAllowedError else: raise e return resp.value()