fixed ll hating on lynx
This commit is contained in:
@@ -35,6 +35,7 @@ $/LicenseInfo$
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os.path
|
import os.path
|
||||||
|
import re
|
||||||
|
|
||||||
# Look for indra/lib/python in all possible parent directories ...
|
# Look for indra/lib/python in all possible parent directories ...
|
||||||
# This is an improvement over the setup-path.py method used previously:
|
# This is an improvement over the setup-path.py method used previously:
|
||||||
@@ -135,6 +136,8 @@ class InstallFile(object):
|
|||||||
print "Downloading",self.url,"to local file",self.filename
|
print "Downloading",self.url,"to local file",self.filename
|
||||||
|
|
||||||
request = urllib2.Request(self.url)
|
request = urllib2.Request(self.url)
|
||||||
|
|
||||||
|
if re.match("/^http:\/\/github.com/", self.url):
|
||||||
request.add_header('User-agent', defaultUserAgent)
|
request.add_header('User-agent', defaultUserAgent)
|
||||||
|
|
||||||
file(self.filename, 'wb').write(urllib2.urlopen(request).read())
|
file(self.filename, 'wb').write(urllib2.urlopen(request).read())
|
||||||
@@ -692,7 +695,10 @@ class SCPOrHTTPHandler(urllib2.BaseHandler):
|
|||||||
url = ''.join(url)
|
url = ''.join(url)
|
||||||
print "Using HTTP:",url
|
print "Using HTTP:",url
|
||||||
request = urllib2.Request(url)
|
request = urllib2.Request(url)
|
||||||
|
|
||||||
|
if re.match("/^http:\/\/github.com/", self.url):
|
||||||
request.add_header('User-agent', defaultUserAgent)
|
request.add_header('User-agent', defaultUserAgent)
|
||||||
|
|
||||||
return urllib2.urlopen(request)
|
return urllib2.urlopen(request)
|
||||||
|
|
||||||
def do_scp(self, remote):
|
def do_scp(self, remote):
|
||||||
|
|||||||
Reference in New Issue
Block a user