Mercurial > p > roundup > code
diff scripts/import_sf.py @ 5407:f004824563a3
Python 3 preparation: update httplib imports.
Existing roundup.anypy.http_ used in another place. Manual patch.
| author | Joseph Myers <jsm@polyomino.org.uk> |
|---|---|
| date | Wed, 25 Jul 2018 00:14:40 +0000 |
| parents | 88dbacd11cd1 |
| children | 3fa026621f69 |
line wrap: on
line diff
--- a/scripts/import_sf.py Wed Jul 25 00:13:52 2018 +0000 +++ b/scripts/import_sf.py Wed Jul 25 00:14:40 2018 +0000 @@ -21,7 +21,7 @@ And you're done! """ -import sys, os, csv, time, httplib, mimetypes +import sys, os, csv, time, mimetypes try: import cElementTree as ElementTree @@ -29,7 +29,7 @@ from elementtree import ElementTree from roundup import instance, hyperdb, date, support, password -from roundup.anypy import urllib_ +from roundup.anypy import http_, urllib_ today = date.Date('.') @@ -40,7 +40,7 @@ figure what the URL should be to access that artifact, and hence any attached files.""" # first we hit this URL... - conn = httplib.HTTPConnection("sourceforge.net") + conn = http_.client.HTTPConnection("sourceforge.net") conn.request("GET", "/support/tracker.php?aid=%s"%aid) response = conn.getresponse() # which should respond with a redirect to the correct url which has the
