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

Changeset 1541

Show
Ignore:
Timestamp:
12/21/06 01:10:15
Author:
fumanchu
Message:

checker:

  1. Moved cherrypy.checker to cherrypy.engine.checker so it can be set to None or another Checker instance in config.
  2. Replaced Checker.checkall with Checker.__call__.
  3. Fixed an output bug in check_compatibility.
Files:

Legend:

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

    r1540 r1541  
    270270# without shadowing cherrypy.config. 
    271271config = _global_conf_alias = _cpconfig.Config() 
    272  
    273 import _cpchecker 
    274 checker = _cpchecker.Checker() 
  • trunk/cherrypy/_cpchecker.py

    r1536 r1541  
    99    global_config_contained_paths = False 
    1010     
    11     def checkall(self): 
     11    def __call__(self): 
    1212        oldformatwarning = warnings.formatwarning 
    1313        warnings.formatwarning = self.formatwarning 
     
    103103                    if k in self.obsolete: 
    104104                        warnings.warn("%r is obsolete. Use %r instead.\n" 
    105                                       "section: [%s]" % (k, v, section)) 
     105                                      "section: [%s]" % (k, self.obsolete[k], section)) 
    106106                    elif k in self.deprecated: 
    107107                        warnings.warn("%r is deprecated. Use %r instead.\n" 
    108                                       "section: [%s]" % (k, v, section)) 
     108                                      "section: [%s]" % (k, self.deprecated[k], section)) 
    109109            else: 
    110110                if section in self.obsolete: 
    111                     warnings.warn("%r is obsolete. Use %r instead." % (section, conf)) 
     111                    warnings.warn("%r is obsolete. Use %r instead." 
     112                                  % (section, self.obsolete[conf])) 
    112113                elif section in self.deprecated: 
    113                     warnings.warn("%r is deprecated. Use %r instead." % (section, conf)) 
     114                    warnings.warn("%r is deprecated. Use %r instead." 
     115                                  % (section, self.decprecated[conf])) 
    114116     
    115117    def check_compatibility(self): 
  • trunk/cherrypy/_cpengine.py

    r1535 r1541  
    1010 
    1111import cherrypy 
    12 from cherrypy import _cprequest 
     12from cherrypy import _cprequest, _cpchecker 
    1313 
    1414# Use a flag to indicate the state of the application engine. 
     
    5353    autoreload_frequency = 1 
    5454    autoreload_match = ".*" 
    55     run_checker = True 
     55    checker = _cpchecker.Checker() 
    5656     
    5757    def __init__(self): 
     
    7676        self.state = STARTING 
    7777         
    78         if self.run_checker: 
    79             cherrypy.checker.checkall() 
     78        if self.checker: 
     79            self.checker() 
    8080         
    8181        for func in self.on_start_engine_list: 

Hosted by WebFaction

Log in as guest/cpguest to create tickets