Permalink
Browse files

Reverted urlparse.urlparse to use indexes rather than attributes for …

…py 2.3
  • Loading branch information...
1 parent 4c6eaf5 commit b8fa71a7998a441c093529fe9cf0bb1c24e75f97 @afarnham afarnham committed with Bruce Williams May 22, 2009
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/fiveruns/dash/protocol.py
@@ -185,8 +185,10 @@ def path(self):
def send(urlparts, selector, fields, files):
content_type, body = encode(fields, files)
- connector = connections[urlparts.scheme]
- connection = connector(urlparts.netloc)
+ URL_SCHEME_IDX = 0
+ URL_NETLOC_IDX = 1
+ connector = connections[urlparts[URL_SCHEME_IDX]]
+ connection = connector(urlparts[URL_NETLOC_IDX])
headers = {'User-Agent': 'Python','Content-Type': content_type}
try:
connection.request('POST', selector, body, headers)

0 comments on commit b8fa71a

Please sign in to comment.