Boost logo

Boost-Commit :

From: grafikrobot_at_[hidden]
Date: 2007-10-29 21:50:42


Author: grafik
Date: 2007-10-29 21:50:42 EDT (Mon, 29 Oct 2007)
New Revision: 40595
URL: http://svn.boost.org/trac/boost/changeset/40595

Log:
Add support for using a proxy as some firewalls are restrictive even to HTTP/GET access.
Text files modified:
   trunk/tools/regression/src/run.py | 9 ++++++++-
   1 files changed, 8 insertions(+), 1 deletions(-)

Modified: trunk/tools/regression/src/run.py
==============================================================================
--- trunk/tools/regression/src/run.py (original)
+++ trunk/tools/regression/src/run.py 2007-10-29 21:50:42 EDT (Mon, 29 Oct 2007)
@@ -34,8 +34,15 @@
         shutil.copyfile( os.path.join(script_local,src), os.path.join(script_dir,src) )
 else:
     print '# Dowloading regression scripts from %s...' % script_remote
+ proxy = None
+ for a in sys.argv[1:]:
+ if a.startswith('--proxy='):
+ proxy = {'http' : a.split('=')[1] }
+ print '--- %s' %(proxy['http'])
+ break
     for src in script_sources:
- urllib.urlretrieve( '%s/%s' % (script_remote,src), os.path.join(script_dir,src) )
+ urllib.FancyURLopener(proxy).retrieve(
+ '%s/%s' % (script_remote,src), os.path.join(script_dir,src) )
 #~ * Make the scripts available to Python
 sys.path.insert(0,os.path.join(root,'tools_regression_src'))
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk