| commit 662: | 29746723a8de |
| parent 661: | fe06f9e5340d |
| branch: | 0.6-maintenance |
Rename variable 'http' to 'conn' as httplib is renamed http in Python
3.
2 months ago
Changed (Δ0 bytes):
raw changeset »
setuptools/command/upload_docs.py (10 lines added, 10 lines removed)
Up to file-list setuptools/command/upload_docs.py:
| … | … | @@ -121,28 +121,28 @@ class upload_docs(upload): |
121 |
121 |
urlparse.urlparse(self.repository) |
122 |
122 |
assert not params and not query and not fragments |
123 |
123 |
if schema == 'http': |
124 |
|
|
124 |
conn = httplib.HTTPConnection(netloc) |
|
125 |
125 |
elif schema == 'https': |
126 |
|
|
126 |
conn = httplib.HTTPSConnection(netloc) |
|
127 |
127 |
else: |
128 |
128 |
raise AssertionError("unsupported schema "+schema) |
129 |
129 |
|
130 |
130 |
data = '' |
131 |
131 |
loglevel = log.INFO |
132 |
132 |
try: |
133 |
http.connect() |
|
134 |
http.putrequest("POST", url) |
|
135 |
|
|
133 |
conn.connect() |
|
134 |
conn.putrequest("POST", url) |
|
135 |
conn.putheader('Content-type', |
|
136 |
136 |
'multipart/form-data; boundary=%s'%boundary) |
137 |
http.putheader('Content-length', str(len(body))) |
|
138 |
http.putheader('Authorization', auth) |
|
139 |
http.endheaders() |
|
140 |
http.send(body) |
|
137 |
conn.putheader('Content-length', str(len(body))) |
|
138 |
conn.putheader('Authorization', auth) |
|
139 |
conn.endheaders() |
|
140 |
conn.send(body) |
|
141 |
141 |
except socket.error, e: |
142 |
142 |
self.announce(str(e), log.ERROR) |
143 |
143 |
return |
144 |
144 |
|
145 |
r = |
|
145 |
r = conn.getresponse() |
|
146 |
146 |
if r.status == 200: |
147 |
147 |
self.announce('Server response (%s): %s' % (r.status, r.reason), |
148 |
148 |
log.INFO) |
