Changeset 6131 for TI01-discovery


Ignore:
Timestamp:
15/12/09 11:22:01 (10 years ago)
Author:
sdonegan
Message:

took out useless pkg_resources handling of config file. use normal procedure as more robust across dirs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery/branches/ingestAutomation-upgrade/OAIBatch/abstractdocumentingester.py

    r6130 r6131  
    224224                logging.info("Retrieving data from datacentre config file, " + datacentre_config_filename) 
    225225                 
    226  
    227                 file = pkg_resources.resource_string('OAIBatch', datacentre_config_filename) 
    228                  
    229                 for line in file.split('\n'): 
    230                         words = line.split() 
     226                #fed up with this rubbish causing problems - use a normal file opener. 
     227                #file = pkg_resources.resource_string('OAIBatch', datacentre_config_filename) 
     228                 
     229                datacentre_config_file = open(self._datacentre_config_filename, "r") 
     230                 
     231                for line in datacentre_config_file.readlines(): 
     232                        words  = string.split(line) 
    231233                        if len(words) == 0: 
    232234                                continue 
     
    241243                        elif words[0] == 'NDG_dataProvider': 
    242244                                self._NDG_dataProvider = True 
     245                 
     246                datacentre_config_file.close() 
    243247                         
    244248                if self._harvest_home == "": 
Note: See TracChangeset for help on using the changeset viewer.