~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): Chuck Short
  • Date: 2012-09-07 09:40:00 UTC
  • Revision ID: package-import@ubuntu.com-20120907094000-je244xxfxnj3xfmn
Tags: 1.3-2ubuntu2
debian/patches/03-fix-appenginge.patch: Backport appengine from requests. 

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