Skip to content

Commit

Permalink
Fix 3a78300.
Browse files Browse the repository at this point in the history
  • Loading branch information
progval committed Oct 23, 2012
1 parent 3a78300 commit 85eb0b4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/utils/web.py
Expand Up @@ -116,8 +116,9 @@ def getUrlFd(url, headers=None, data=None):
auth, url = url.split('@')
url = scheme + '://' + url
request = urllib2.Request(url, headers=headers, data=data)
request.add_header('Authorization',
'Basic ' + base64.b64encode(auth))
if 'auth' in locals():
request.add_header('Authorization',
'Basic ' + base64.b64encode(auth))
else:
request = url
request.add_data(data)
Expand Down

0 comments on commit 85eb0b4

Please sign in to comment.