Changeset 118


Ignore:
Timestamp:
04/20/09 15:00:52 (6 years ago)
Author:
jon
Message:

rewrite of export logic to use configuration libraries

File:
1 edited

Legend:

Unmodified
Added
Removed
  • collective.imstransport.orig/trunk/collective/imstransport/Manifest.py

    r115 r118  
    3939import md5 
    4040import os 
     41from App import config 
    4142 
    4243 
     
    6061        self.document = None 
    6162        self.destination = None 
     63        self.ims_path = '' 
    6264        self.manifest_node = None 
    63  
    64         for path in os.environ['PYTHONPATH'].split(':'): 
    65             if 'collective.imstransport' in path: 
    66                 self.ims_path = os.sep.join(path.split(os.sep)[:-1]) 
    67                 break 
    68         else: 
    69             self.ims_path = '' 
    70  
    71  
     65        
     66        cfg = config.getConfiguration() 
     67        cfglist = cfg.instancehome.split(os.sep)[:-2] 
     68        cfglist += ['src'] 
     69        self.ims_path = os.sep.join(cfglist) 
    7270 
    7371    def setWriterType(self, wtype): 
Note: See TracChangeset for help on using the changeset viewer.