Changeset 1914

Show
Ignore:
Timestamp:
08/30/08 18:03:54 (3 months ago)
Author:
alo
Message:

--

Files:

Legend:

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

    r1913 r1914  
     12008-08-30  Alvaro Lopez Ortega  <alvaro@alobbs.com> 
     2 
     3        * admin/CherokeeManagement.py (cherokee_build_info_has): This 
     4        function was randomly failing because a problem with the caching 
     5        structure.  This patch fixing the problem. 
     6 
    172008-08-29  Alvaro Lopez Ortega  <alvaro@alobbs.com> 
    28 
    39        * cherokee/socket.h (OPENSSL_NO_TLSEXT): Fixes the twisted 
    4         OPENSSL_NO_TLSEXT define. It looks wrong to require a define is 
     10        OPENSSL_NO_TLSEXT define. It looks wrong to require a define in 
    511        case a feature is NOT present on the system. 
    612 
  • cherokee/trunk/admin/CherokeeManagement.py

    r1864 r1914  
    228228 
    229229 
    230 _built_in_list      = [] 
    231 _built_in_list_done = False 
    232  
     230_built_in_lists = {} 
    233231 
    234232def cherokee_build_info_has (filter, module): 
    235233    # Let's see whether it's built-in 
    236     global _built_in_list 
    237     global _built_in_list_done 
    238  
    239     if not _built_in_list_done: 
    240         _built_in_list_done = True 
     234    global _built_in_lists 
     235 
     236    if not _built_in_lists.has_key(filter): 
     237        _built_in_lists[filter] = {} 
    241238 
    242239        try: 
    243240            f = os.popen ("%s -i" % (CHEROKEE_SRV_PATH)) 
    244             cont = f.read() 
     241        except: 
     242            print ("ERROR: Couldn't execute '%s -i'"  % (CHEROKEE_SRV_PATH)) 
     243            return 
     244 
     245        cont = f.read() 
     246 
     247        try: 
    245248            f.close() 
    246         except: 
    247             pass 
     249        except: pass 
    248250 
    249251        try: 
     
    252254                if l.startswith(filter_string): 
    253255                    line = l.replace (filter_string, "") 
     256                    _built_in_lists[filter] = line.split(" ") 
    254257                    break 
    255             _built_in_list = line.split(" ") 
    256258        except: 
    257259            pass 
    258260 
    259     return module in _built_in_list 
     261    return module in _built_in_lists[filter] 
    260262 
    261263def cherokee_has_plugin (module):