diff --git a/apiclient/http.py b/apiclient/http.py index e84b190..d091a86 100644 --- a/apiclient/http.py +++ b/apiclient/http.py @@ -828,8 +828,10 @@ class BatchHttpRequest(object): Args: callback: callable, A callback to be called for each response, of the - form callback(id, response). The first parameter is the request id, and - the second is the deserialized response object. + form callback(id, response, exception). The first parameter is the + request id, and the second is the deserialized response object. The + third is an apiclient.errors.HttpError exception object if an HTTP error + occurred while processing the request, or None if no error occurred. batch_uri: string, URI to send batch requests to. """ if batch_uri is None: @@ -1030,8 +1032,10 @@ class BatchHttpRequest(object): Args: request: HttpRequest, Request to add to the batch. callback: callable, A callback to be called for this response, of the - form callback(id, response). The first parameter is the request id, and - the second is the deserialized response object. + form callback(id, response, exception). The first parameter is the + request id, and the second is the deserialized response object. The + third is an apiclient.errors.HttpError exception object if an HTTP error + occurred while processing the request, or None if no errors occurred. request_id: string, A unique id for the request. The id will be passed to the callback with the response. diff --git a/tests/test_oauth2client_appengine.py b/tests/test_oauth2client_appengine.py index a11c5e9..edc5996 100644 --- a/tests/test_oauth2client_appengine.py +++ b/tests/test_oauth2client_appengine.py @@ -51,8 +51,8 @@ from google.appengine.ext import testbed from google.appengine.runtime import apiproxy_errors from oauth2client.anyjson import simplejson from oauth2client.appengine import AppAssertionCredentials -from oauth2client.appengine import FlowProperty from oauth2client.appengine import CredentialsModel +from oauth2client.appengine import FlowProperty from oauth2client.appengine import OAuth2Decorator from oauth2client.appengine import OAuth2Handler from oauth2client.appengine import StorageByKeyName @@ -64,6 +64,7 @@ from oauth2client.client import OAuth2Credentials from oauth2client.client import flow_from_clientsecrets from webtest import TestApp + DATA_DIR = os.path.join(os.path.dirname(__file__), 'data')