summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-10-14 19:04:48 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2009-10-14 19:04:48 (GMT)
commit92331d5e1be51aa990836dd8f0c43b33e8802a7d (patch)
tree12b18f02da002bcb00ca49ca467615d84ea58639
parentb844ef795059b1be5d7171d4268735a3de7edeae (diff)
downloadcpython-92331d5e1be51aa990836dd8f0c43b33e8802a7d.zip
cpython-92331d5e1be51aa990836dd8f0c43b33e8802a7d.tar.gz
cpython-92331d5e1be51aa990836dd8f0c43b33e8802a7d.tar.bz2
Fix py3k warnings in httplib
-rw-r--r--Lib/httplib.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py
index a83245b..3f44f12 100644
--- a/Lib/httplib.py
+++ b/Lib/httplib.py
@@ -706,8 +706,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
@@ -757,7 +757,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
@@ -929,7 +929,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)