Merged revisions 75407,75409-75413,75415,75419-75421 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r75407 | antoine.pitrou | 2009-10-14 20:30:52 +0300 (Wed, 14 Oct 2009) | 3 lines

  Fix py3k warnings in the aifc module
........
  r75409 | antoine.pitrou | 2009-10-14 21:01:33 +0300 (Wed, 14 Oct 2009) | 3 lines

  Fix py3k warnings in bsddb
........
  r75410 | antoine.pitrou | 2009-10-14 21:09:45 +0300 (Wed, 14 Oct 2009) | 3 lines

  Silence a py3k warning claiming to affect Lib/calendar.py
........
  r75411 | antoine.pitrou | 2009-10-14 21:12:54 +0300 (Wed, 14 Oct 2009) | 3 lines

  Fix a py3k warning in the StringIO module (exhibited in test_codecencodings_cn)
........
  r75412 | antoine.pitrou | 2009-10-14 21:27:32 +0300 (Wed, 14 Oct 2009) | 3 lines

  Fix py3k warnings in the socket module
........
  r75413 | antoine.pitrou | 2009-10-14 21:31:05 +0300 (Wed, 14 Oct 2009) | 3 lines

  Fix a py3k warning in the sndhdr module (found with test_email)
........
  r75415 | antoine.pitrou | 2009-10-14 21:39:46 +0300 (Wed, 14 Oct 2009) | 3 lines

  Silence some py3k warnings claiming to affect _pyio
........
  r75419 | antoine.pitrou | 2009-10-14 21:56:11 +0300 (Wed, 14 Oct 2009) | 3 lines

  Silence py3k warning claiming to affect the random module
........
  r75420 | antoine.pitrou | 2009-10-14 22:04:48 +0300 (Wed, 14 Oct 2009) | 3 lines

  Fix py3k warnings in httplib
........
  r75421 | antoine.pitrou | 2009-10-14 22:09:48 +0300 (Wed, 14 Oct 2009) | 3 lines

  Fix py3k warnings in the uuid module
........
This commit is contained in:
Ezio Melotti 2010-08-03 03:19:00 +00:00
parent efcdd8494a
commit 262a47d2b9
10 changed files with 142 additions and 145 deletions

View file

@ -707,8 +707,8 @@ class HTTPConnection:
if code != 200:
self.close()
raise socket.error, "Tunnel connection failed: %d %s" % (code,
message.strip())
raise socket.error("Tunnel connection failed: %d %s" % (code,
message.strip()))
while True:
line = response.fp.readline()
if line == '\r\n': break
@ -758,7 +758,7 @@ class HTTPConnection:
else:
self.sock.sendall(str)
except socket.error, v:
if v[0] == 32: # Broken pipe
if v.args[0] == 32: # Broken pipe
self.close()
raise
@ -914,7 +914,7 @@ class HTTPConnection:
self._send_request(method, url, body, headers)
except socket.error, v:
# trap 'Broken pipe' if we're allowed to automatically reconnect
if v[0] != 32 or not self.auto_open:
if v.args[0] != 32 or not self.auto_open:
raise
# try one more time
self._send_request(method, url, body, headers)