Changeset 6427 for TI01-discovery


Ignore:
Timestamp:
28/01/10 14:40:39 (9 years ago)
Author:
sdonegan
Message:

Updated handling of oaiconfig file & passing to harvester class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery/trunk/OAIInfoEditor/oai_info_editor/config/oiemiddleware.py

    r5631 r6427  
    5151        self.globals.dataDir = cf.get('DATA_STORE', 'appDataFileDir') 
    5252        self.globals.backupDir = cf.get('DATA_STORE', 'backupFileDir') 
     53         
     54        oaiConfig = cf.get('DATA_STORE', 'oaiConfigFile') 
     55        if not oaiConfig: 
     56                raise ValueError("No OAI ingest configuration file can be found!!  Cannot start editor until file specified") 
     57         
     58        self.globals.oaiConfig = cf.get('DATA_STORE', 'oaiConfigFile') 
     59         
     60         
     61        #now using configurable ingester, need to make sure harvestDir takes this from the oai config file 
    5362        harvestDir = cf.get('DATA_STORE', 'harvestDir') 
    5463        if not harvestDir: 
    5564            raise ValueError("No harvest directory config data has been specified - so cannot harvest files.") 
    5665         
    57         self.globals.harvester = Harvester(self.globals.mailServer, outDir = harvestDir) 
     66         
     67        self.globals.harvester = Harvester(self.globals.mailServer, configFile = oaiConfig) 
    5868 
    5969        # store a data access object to general use 
Note: See TracChangeset for help on using the changeset viewer.