From 6261272eb95e7844332c697394283fdbebbf2223 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Wed, 18 Feb 2015 00:33:02 -0500 Subject: [PATCH] Rename helper function to communiate intent. Per: https://github.com/GoogleCloudPlatform/gcloud-python/pull/654/files#r24877935 --- gcloud/storage/batch.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcloud/storage/batch.py b/gcloud/storage/batch.py index 6aae66e239e45..e4258d7a574a2 100644 --- a/gcloud/storage/batch.py +++ b/gcloud/storage/batch.py @@ -121,7 +121,7 @@ def finish(self): _req = self._connection._make_request response, content = _req('POST', url, data=payload, headers=headers) - self._responses = list(_crack_mime_response(response, content)) + self._responses = list(_unpack_batch_response(response, content)) return self._responses def __enter__(self): @@ -138,7 +138,7 @@ def __exit__(self, exc_type, exc_val, exc_tb): _BATCHES.pop() -def _crack_mime_response(response, content): +def _unpack_batch_response(response, content): """Convert response, content -> [(status, reason, payload)].""" parser = Parser() faux_message = ('Content-Type: %s\nMIME-Version: 1.0\n\n%s' % @@ -202,7 +202,7 @@ def reset(self): def finalize(self): """Return the deferred requests. - + First restores the connection's ``http`` via ``reset()``. """ self.reset()