~matsubara/ubuntu/trusty/python-urllib3/bug-1412545

« back to all changes in this revision

Viewing changes to debian/patches/03-fix-appenginge.patch

  • Committer: Package Import Robot
  • Author(s): Barry Warsaw
  • Date: 2012-11-01 15:31:36 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20121101153136-w2fm02askveqxxkx
Tags: 1.5-0ubuntu1
* New upstream release.  Remaining changes:
  - 01_do-not-use-embedded-python-six.patch: refreshed
  - 02_require-cert-verification.patch: refreshed
  - 03-fix-appenginge.patch: removed

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Description: backport appengine fixes from requests
2
 
Author: Chuck Short
3
 
fowarded: not-needed.
4
 
diff -Naupr urllib3-1.3.orig/urllib3/connectionpool.py urllib3-1.3/urllib3/connectionpool.py
5
 
--- urllib3-1.3.orig/urllib3/connectionpool.py  2012-03-25 13:16:45.000000000 -0500
6
 
+++ urllib3-1.3/urllib3/connectionpool.py       2012-09-07 09:35:17.189259739 -0500
7
 
@@ -260,10 +260,11 @@ class HTTPConnectionPool(ConnectionPool,
8
 
 
9
 
         httplib_response = conn.getresponse()
10
 
 
11
 
-        log.debug("\"%s %s %s\" %s %s" %
12
 
-                  (method, url,
13
 
-                   conn._http_vsn_str, # pylint: disable-msg=W0212
14
 
-                   httplib_response.status, httplib_response.length))
15
 
+        # AppEngine doesn't have a version attr.
16
 
+        http_version = getattr(conn, '_http_vsn_str', 'HTTP/?'),
17
 
+        log.debug("\"%s %s %s\" %s %s" % (method, url, http_version,
18
 
+                                          httplib_response.status,
19
 
+                                          httplib_response.length))
20
 
 
21
 
         return httplib_response
22