Changeset 4832


Ignore:
Timestamp:
19/01/09 10:14:57 (11 years ago)
Author:
cbyrom
Message:

Fix vocabtermdata to allow retrieval of data via http proxies.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ndgCommon/trunk/ndg/common/src/models/vocabtermdata.py

    r4810 r4832  
    264264 
    265265    # TODO: this should be more configurable, really 
    266     BROWSE_SERVER_URL = "http://ndg.nerc.ac.uk" 
     266    BROWSE_SERVER_URL = "http://badc.nerc.ac.uk:50001" 
    267267    BROWSE_STEM_URL = "/view/" 
    268268    BROWSE_ROOT_URL = BROWSE_SERVER_URL + BROWSE_STEM_URL 
    269269     
    270270    BADC_BROWSE_ROOT = 'http://badc.nerc.ac.uk/browse' 
     271     
     272    # Define proxies required when using urllib 
     273    PROXIES = {'http':'http://wwwcache.rl.ac.uk:8080'} 
    271274 
    272275    def __init__(self): 
     
    395398        ''' 
    396399        logging.info("Retrieving vocab server data page") 
    397         f = urllib.urlopen(self.VOCAB_SERVER_URL) 
     400        f = urllib.urlopen(self.VOCAB_SERVER_URL, proxies = self.PROXIES) 
    398401        self.VOCAB_DATA_PAGE = f.read() 
    399402        f.close() 
Note: See TracChangeset for help on using the changeset viewer.