Changeset 1575
- Timestamp:
- 12/28/06 15:18:53
- Files:
-
- trunk/cherrypy/_cpchecker.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cpchecker.py
r1574 r1575 141 141 # ------------------------ Known Namespaces ------------------------ # 142 142 143 known_config_namespaces = ["checker", "engine", "hooks", "log", 144 "request", "response", "server", 145 "tools", 146 "wsgi"] 143 extra_config_namespaces = [] 147 144 148 145 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 149 151 for section, conf in config.iteritems(): 150 152 is_path_section = section.startswith("/") … … 153 155 atoms = k.split(".") 154 156 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): 158 159 msg = ("The config entry %r is invalid; " 159 160 "try %r instead.\nsection: [%s]"

