From 07f219c589799bcb539ac79382f63cb5f1aafe2f Mon Sep 17 00:00:00 2001 From: "\"Brett Cannon ext:(%22)" Date: Sun, 17 Jan 2010 12:57:41 -0800 Subject: Rename variable 'http' to 'conn' as httplib is renamed http in Python 3. --HG-- branch : distribute extra : rebase_source : 50d0da5b2e099c4bfe55ad81dce0f73edb4f994c --- setuptools/command/upload_docs.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'setuptools/command/upload_docs.py') diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 46e06bc6..4548635c 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -121,28 +121,28 @@ class upload_docs(upload): urlparse.urlparse(self.repository) assert not params and not query and not fragments if schema == 'http': - http = httplib.HTTPConnection(netloc) + conn = httplib.HTTPConnection(netloc) elif schema == 'https': - http = httplib.HTTPSConnection(netloc) + conn = httplib.HTTPSConnection(netloc) else: raise AssertionError("unsupported schema "+schema) data = '' loglevel = log.INFO try: - http.connect() - http.putrequest("POST", url) - http.putheader('Content-type', + conn.connect() + conn.putrequest("POST", url) + conn.putheader('Content-type', 'multipart/form-data; boundary=%s'%boundary) - http.putheader('Content-length', str(len(body))) - http.putheader('Authorization', auth) - http.endheaders() - http.send(body) + conn.putheader('Content-length', str(len(body))) + conn.putheader('Authorization', auth) + conn.endheaders() + conn.send(body) except socket.error, e: self.announce(str(e), log.ERROR) return - r = http.getresponse() + r = conn.getresponse() if r.status == 200: self.announce('Server response (%s): %s' % (r.status, r.reason), log.INFO) -- cgit v1.2.1