MCPcopy
hub / github.com/cherrypy/cherrypy / _tree_namespace_handler

Function _tree_namespace_handler

cherrypy/_cpconfig.py:283–292  ·  view source on GitHub ↗

Namespace handler for the 'tree' config namespace.

(k, v)

Source from the content-addressed store, hash-verified

281
282
283def _tree_namespace_handler(k, v):
284 """Namespace handler for the 'tree' config namespace."""
285 if isinstance(v, dict):
286 for script_name, app in v.items():
287 cherrypy.tree.graft(app, script_name)
288 msg = 'Mounted: %s on %s' % (app, script_name or '/')
289 cherrypy.engine.log(msg)
290 else:
291 cherrypy.tree.graft(v, v.script_name)
292 cherrypy.engine.log('Mounted: %s on %s' % (v, v.script_name or '/'))
293
294
295Config.namespaces['tree'] = _tree_namespace_handler

Callers

nothing calls this directly

Calls 3

itemsMethod · 0.80
graftMethod · 0.80
logMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…