Changeset 6638


Ignore:
Timestamp:
Mar 27, 2009, 10:35:17 AM (16 years ago)
Author:
rwilson
Message:

Minor changes related to automatic patong validation.

Location:
anuga_core/source/anuga/utilities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/utilities/log.py

    r6583 r6638  
    8585
    8686        # tell the world how we are set up
    87         start_msg = ("Logfile is '%s' with logging level of %s, "
     87        start_msg = ("\nLogfile is '%s' with logging level of %s, "
    8888                     "console logging level is %s"
    8989                     % (log_filename,
  • anuga_core/source/anuga/utilities/system_tools.py

    r6627 r6638  
    294294# @param file_url URL of the file to fetch.
    295295# @param file_name Path to file to create in the filesystem.
     296# @param auth Auth tuple (httpproxy, proxyuser, proxypass).
    296297# @param blocksize Read file in this block size.
    297 # @param auth Auth tuple (httpproxy, proxyuser, proxypass).
    298298# @return 'auth' tuple for subsequent calls, if successful.
    299299# @note If 'auth' not supplied, will prompt user.
     
    301301# @note Will try using environment variable PROXY_USERNAME for proxy username.
    302302# @note Will try using environment variable PROXY_PASSWORD for proxy password.
    303 def get_web_file(file_url, file_name, blocksize=1024*1024, auth=None):
     303def get_web_file(file_url, file_name, auth=None, blocksize=1024*1024):
    304304    '''Get a file from the web.'''
    305305
     
    309309        return None     # no proxy, no auth required
    310310    except IOError, e:
    311         print str(e)
    312311        if e[1] != 407:
    313312            raise       # raise error if *not* proxy auth error
     
    345344
    346345    # open 'net file
    347     proxy = urllib2.ProxyHandler({'http': 'http://'+proxyuser+':'+proxypass
    348                                                +'@'+httpproxy})
     346    proxy = urllib2.ProxyHandler({'http': 'http://' + proxyuser
     347                                              + ':' + proxypass
     348                                              + '@' + httpproxy})
    349349    authinfo = urllib2.HTTPBasicAuthHandler()
    350350    opener = urllib2.build_opener(proxy, authinfo, urllib2.HTTPHandler)
Note: See TracChangeset for help on using the changeset viewer.