Entropy/RepoInterface:
- fix internet connection check git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2096 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
@@ -149,8 +149,13 @@ def get_remote_data(url):
|
||||
socket.setdefaulttimeout(60)
|
||||
# now pray the server
|
||||
try:
|
||||
if etpConst['proxy']:
|
||||
proxy_support = urllib2.ProxyHandler(etpConst['proxy'])
|
||||
mydict = {}
|
||||
if etpConst['proxy']['ftp']:
|
||||
mydict['ftp'] = etpConst['proxy']['ftp']
|
||||
if etpConst['proxy']['http']:
|
||||
mydict['http'] = etpConst['proxy']['http']
|
||||
if mydict:
|
||||
proxy_support = urllib2.ProxyHandler(mydict)
|
||||
opener = urllib2.build_opener(proxy_support)
|
||||
urllib2.install_opener(opener)
|
||||
item = urllib2.urlopen(url)
|
||||
|
||||
Reference in New Issue
Block a user