Changeset 2046 for TI07-MOLES


Ignore:
Timestamp:
25/01/07 09:33:47 (12 years ago)
Author:
lawrence
Message:

Mainly test code to understand browse deployment environment (plus tiny
bug fix in browse docuemnt retrieval).

Location:
TI07-MOLES/trunk/PythonCode/wsgi
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • TI07-MOLES/trunk/PythonCode/wsgi/00deploy.sh

    r2045 r2046  
    66echo $PYTHONPATH 
    77${MYPYTHONBIN}paster serve ndg.ini 
    8 # need to modifiy to have shell magic number, and get environmentand 
    9 # add to python path 
  • TI07-MOLES/trunk/PythonCode/wsgi/ndg.ini

    r2045 r2046  
    1 #!/usr/bin/env paster 
    2 # 
     1 
    32# This is the (proto) paster-deploy configuration file for the NDG discovery and browse software  
    43# BNL December 2006 
    5 # 
    6  
    7 #[exe] 
    8 #command=server 
    9 #daemon=true 
    10 #user=bnl 
    11 #group=webuser 
    124 
    135[server:main] 
     
    168port = 8001 
    179#use = egg:PasteScript#flup_fcgi_thread 
    18 #socket = /tmp/ndg.fastcgi.soc 
     10#socket = /tmp/ndg_fastcgi.soc 
    1911 
    2012 
  • TI07-MOLES/trunk/PythonCode/wsgi/ndgGateKeeper.py

    r1933 r2046  
    7272           pass 
    7373         
    74         r=self.wrapTarget(environ,wrapped_start_response) 
     74        try: 
     75            # now look at the document and decide whether the user can look at it ... 
     76            r=self.wrapTarget(environ,wrapped_start_response) 
     77            # yes they can see it ... 
     78            r=self.shower.get(xml,inputs['format'],otype=outputType) 
     79        except ValueError,e: 
     80            r=e 
     81 
     82        # now do the real start response 
     83        start_response('200 OK', [('Content-Type', ctype)]) 
     84        print r 
    7585        xml=r[0] 
    7686         
    77         # now look at the document and decide whether the user can look at it ... 
    7887         
    79         # yes they can see it ... 
    80         r=self.shower.get(xml,inputs['format'],otype=outputType) 
    81          
    82         # now do the real start response 
    83         start_response('200 OK', [('Content-Type', ctype)]) 
    8488         
    8589        return r 
  • TI07-MOLES/trunk/PythonCode/wsgi/ndgRetrieve.py

    r1989 r2046  
    9090        if 'uri' not in inputs.keys(): 
    9191            r=self.__prompt() 
     92            raise ValueError,r 
    9293        else: 
    9394            uri=inputs['uri'].strip() 
     
    136137                    ctype='text/xml' 
    137138            start_response('200 OK', [('Content-Type', ctype)]) 
    138             return [r]     
     139        return [r]     
    139140                 
    140141     
Note: See TracChangeset for help on using the changeset viewer.