Changeset 630

Show
Ignore:
Timestamp:
01/19/07 18:17:58 (2 years ago)
Author:
alo
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cherokee/trunk/ChangeLog

    r629 r630  
    112007-01-19  Alvaro Lopez Ortega  <alvaro@alobbs.com> 
     2 
     3        * contrib/05to06.py: Adds a faked DocumentRoot if the virtual 
     4        server didn't contain one.  0.5 wasn't checking for a 
     5        document_root but 0.6 does. It is no more than a work around. 
    26 
    37        * contrib/05to06.py: Now, it adds the "priority" entry to all the 
  • cherokee/trunk/contrib/05to06.py

    r629 r630  
    1010import sys 
    1111import string 
     12 
     13FAKED_DOCUMENT_ROOT = '/faked' 
     14 
    1215 
    1316class Syntax: 
     
    3437 
    3538    vsrv_entries =    {'directoryindex':        'list', 
    36                        'documentroot':          'path', 
    3739                       'sslcertificatefile':    'path', 
    3840                       'sslcertificatekeyfile': 'path', 
     
    387389            print "vserver!%s!%s = %s" % (vserver, kind, str(val_val)) 
    388390 
     391        elif kind == 'documentroot': 
     392            kind, val = self._lex.get_token() 
     393            if kind != 'path': raise "Malformed DocumentRoot" 
     394 
     395            print "vserver!%s!document_root = %s" % (vserver, val) 
     396            self._vserver_has_document_root = True 
     397 
    389398        elif kind == 'directory': 
    390399            kind, dir_val = self._lex.get_token() 
     
    623632            print "vserver!%s!domain!%d = %s" % (vserver, i, v) 
    624633 
     634        self._vserver_has_document_root = False 
     635 
    625636        while True: 
    626637            more = self._process_virtual_server_content (vserver) 
     
    630641        if kind != '}': raise "Expected }, got %s=%s" % (kind,val) 
    631642 
     643        if not self._vserver_has_document_root: 
     644            print "vserver!%s!document_root = %s" % (vserver, FAKED_DOCUMENT_ROOT) 
    632645 
    633646    def process_sentence (self):