thirdparty/google_appengine/google/appengine/api/users.py
changeset 1278 a7766286a7be
parent 109 620f9b141567
child 2273 e4cb9c53db3e
--- 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()