summaryrefslogtreecommitdiff
path: root/python2/httplib2
diff options
context:
space:
mode:
authorJoe Gregorio <jcgregorio@google.com>2011-06-22 16:43:39 -0400
committerJoe Gregorio <jcgregorio@google.com>2011-06-22 16:43:39 -0400
commit2149bbfe16b9fc813ad4f32bc582aaa50e5fa58f (patch)
treece313ec78de152cd2b3402eff4e8e174ca11c13f /python2/httplib2
parentb2cfdf6c271f3100fd9789ba74ace0d6e3568e4a (diff)
downloadhttplib2-2149bbfe16b9fc813ad4f32bc582aaa50e5fa58f.tar.gz
Add unit tests for app engine specific code. Fix bugs found in said tests.
Diffstat (limited to 'python2/httplib2')
-rw-r--r--python2/httplib2/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python2/httplib2/__init__.py b/python2/httplib2/__init__.py
index 158e967..f894ee2 100644
--- a/python2/httplib2/__init__.py
+++ b/python2/httplib2/__init__.py
@@ -147,6 +147,7 @@ class ServerNotFoundError(HttpLib2Error): pass
class ProxiesUnavailableError(HttpLib2Error): pass
class CertificateValidationUnsupported(HttpLib2Error): pass
class SSLHandshakeError(HttpLib2Error): pass
+class NotSupportedOnThisPlatform(HttpLib2Error): pass
class CertificateHostnameMismatch(SSLHandshakeError):
def __init__(self, desc, host, cert):
HttpLib2Error.__init__(self, desc)
@@ -976,7 +977,8 @@ try:
deadline=self.timeout,
validate_certificate=self.validate_certificate)
self.response = ResponseDict(response.headers)
- self.response['status'] = response.status_code
+ self.response['status'] = str(response.status_code)
+ self.response.status = response.status_code
setattr(self.response, 'read', lambda : response.content)
# Make sure the exceptions raised match the exceptions expected.