Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 1575

Show
Ignore:
Timestamp:
12/28/06 15:18:53
Author:
fumanchu
Message:

Fix for #632 (CP checker misleading warning on customized toolbox).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/_cpchecker.py

    r1574 r1575  
    141141    # ------------------------ Known Namespaces ------------------------ # 
    142142     
    143     known_config_namespaces = ["checker", "engine", "hooks", "log", 
    144                                "request", "response", "server", 
    145                                "tools", 
    146                                "wsgi"] 
     143    extra_config_namespaces = [] 
    147144     
    148145    def _known_ns(self, config): 
     146        ns = ["wsgi"] 
     147        ns.extend(cherrypy.engine.request_class.namespaces.keys()) 
     148        ns.extend(cherrypy.config.namespaces.keys()) 
     149        ns += self.extra_config_namespaces 
     150         
    149151        for section, conf in config.iteritems(): 
    150152            is_path_section = section.startswith("/") 
     
    153155                    atoms = k.split(".") 
    154156                    if len(atoms) > 1: 
    155                         if atoms[0] not in self.known_config_namespaces: 
    156                             if (atoms[0] == "cherrypy" and 
    157                                     atoms[1] in self.known_config_namespaces): 
     157                        if atoms[0] not in ns: 
     158                            if (atoms[0] == "cherrypy" and atoms[1] in ns): 
    158159                                msg = ("The config entry %r is invalid; " 
    159160                                       "try %r instead.\nsection: [%s]" 

Hosted by WebFaction

Log in as guest/cpguest to create tickets