Changeset 4183


Ignore:
Timestamp:
08/09/08 10:08:58 (11 years ago)
Author:
cbyrom
Message:

Fine tune handling of properties object handled by ndgObject + add extra
logging.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/discovery.py

    r4176 r4183  
    222222            errors=[] 
    223223            for result in results:  
    224                 obj=ndgObject(result[0], config = self.cf) 
     224                obj=ndgObject(result[0], config = self.cf.config) 
    225225                try: 
    226226                    difs.append(DIF(result[1],ndgObj=obj)) 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/fetch.py

    r4077 r4183  
    11from ows_server.lib.base import * 
    2 import os 
     2import os, logging 
    33 
    44import pylons 
     
    1414        ''' returns a file from the filestore. Used for the wcs store parameter, but could be used for other services. 
    1515        checks the security information in the text file that accompanies the file and checks ndg security''' 
     16        logging.info("Fetching file, '%s'" %file) 
    1617         
    1718        #given the filename, these are the paths to the file, and to the accompanying text file 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/retrieve.py

    r3901 r4183  
    2020    def __setup(self,uri): 
    2121        ''' Common setup stuff for all the actions on this controller ''' 
     22        logging.info("Setting up RetrieveController") 
     23        self.cf=request.environ['ndgConfig'] 
    2224        try: 
    23             self.uri=ndgObject(uri) 
     25            self.uri=ndgObject(uri, config=self.cf.config) 
    2426        except ValueError,e: 
    2527            return e 
    26         self.cf=request.environ['ndgConfig'] 
    27         self.uri.setConfig(self.cf) 
    28         self.requestor=request.environ['REMOTE_ADDR'] 
     28 
    2929        self.logger=0 
    3030        if logger: self.logger=logger 
    3131        self.inputs=dict(parse_querystring(request.environ)) 
    32  
    3332 
    3433        # NB: we could have two types of query string argument: 
     
    4342        #c.selectedGranules = [g_uri for g_uri, g_name in session.get('selection', [])] 
    4443                               
    45  
     44        logging.info("RetrieveController set up") 
    4645        return 0 
    4746        
     
    182181    def __mytb(self,name): 
    183182        ''' Get the trackback info for this page  
    184         (can't do it in Kid because it doesn't do substutions in comments) ''' 
     183        (can't do it in Kid because it doesn't do substitutions in comments) ''' 
    185184        s='''<!-- 
    186185        <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
  • exist/trunk/python/ndgUtils/ndgObject.py

    r4175 r4183  
    7676 
    7777         
    78     def setConfig(self,config): 
     78    def setConfig(self, config): 
    7979        '''  
    8080        Set up the configuration for retrieving this document  
     
    9797        # set default return format - if not set, just return in original format 
    9898        fmt='' 
    99         if self.config.config.has_option('DISCOVERY','formatDefault'): 
    100             fmt=self.config.config.get('DISCOVERY','formatDefault') 
     99        if self.config.has_option('DISCOVERY','formatDefault'): 
     100            fmt=self.config.get('DISCOVERY','formatDefault') 
    101101            logging.info("Default discovery format set to: %s" %fmt) 
    102102             
     
    111111        # - if not, default to 'unknown' 
    112112        servicehost = 'unknown' 
    113         if self.config.config.has_option('NDG_B_SERVICE',self.repository): 
     113        if self.config.has_option('NDG_B_SERVICE',self.repository): 
    114114            servicehost=self.config.get('NDG_B_SERVICE',self.repository) 
    115115             
Note: See TracChangeset for help on using the changeset viewer.