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

Changeset 277

Show
Ignore:
Timestamp:
06/11/05 08:51:21
Author:
mikerobi
Message:

getSpecialFunction renamed getSpecialAttribute

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CHANGELOG.txt

    r276 r277  
     12005-06-11: 
     2    * getSpecialFunction renamed getSpecialAttribute (mikerobi) 
     3 
    142005-06-10: 
    25    * New test suite (no forks, no exec). (fumanchu) 
  • trunk/cherrypy/_cpconfig.py

    r275 r277  
    130130def _load(configFile = None): 
    131131    """ Convert an INI file to a dictionary """ 
    132     _cpLogMessage = _cputil.getSpecialFunction('_cpLogMessage') 
     132    _cpLogMessage = _cputil.getSpecialAttribute('_cpLogMessage') 
    133133 
    134134    # Parse config file 
     
    156156 
    157157def outputConfigMap(): 
    158     _cpLogMessage = _cputil.getSpecialFunction('_cpLogMessage') 
     158    _cpLogMessage = _cputil.getSpecialAttribute('_cpLogMessage') 
    159159    _cpLogMessage("Server parameters:", 'CONFIG') 
    160160    _cpLogMessage("  server.environment: %s" % get('server.environment'), 'CONFIG') 
  • trunk/cherrypy/_cphttpserver.py

    r267 r277  
    104104    def log_message(self, format, *args): 
    105105        """ We have to override this to use our own logging mechanism """ 
    106         _cputil.getSpecialFunction('_cpLogMessage')(format % args, "HTTP") 
     106        _cputil.getSpecialAttribute('_cpLogMessage')(format % args, "HTTP") 
    107107 
    108108 
     
    138138            return 1 
    139139        except (KeyboardInterrupt, SystemExit): 
    140             _cputil.getSpecialFunction('_cpLogMessage')("<Ctrl-C> hit: shutting down http server", "HTTP") 
     140            _cputil.getSpecialAttribute('_cpLogMessage')("<Ctrl-C> hit: shutting down http server", "HTTP") 
    141141            self.shutdown() 
    142142     
     
    192192        """Handle an error gracefully.  May be overridden.""" 
    193193        errorBody = _cphttptools.formatExc() 
    194         _cputil.getSpecialFunction('_cpLogMessage')(errorBody) 
     194        _cputil.getSpecialAttribute('_cpLogMessage')(errorBody) 
    195195 
    196196 
     
    270270            request, client_address = self.get_request() 
    271271        except (KeyboardInterrupt, SystemExit): 
    272             _cputil.getSpecialFunction('_cpLogMessage')("<Ctrl-C> hit: shutting down", "HTTP") 
     272            _cputil.getSpecialAttribute('_cpLogMessage')("<Ctrl-C> hit: shutting down", "HTTP") 
    273273            return 0 
    274274        except socket.error, e: 
  • trunk/cherrypy/_cphttptools.py

    r275 r277  
    159159            pass 
    160160        msg = "%s - %s" % (cpg.request.remoteAddr, self.requestLine[:-2]) 
    161         _cputil.getSpecialFunction('_cpLogMessage')(msg, "HTTP") 
     161        _cputil.getSpecialAttribute('_cpLogMessage')(msg, "HTTP") 
    162162         
    163163        cpg.request.base = "http://" + cpg.request.headerMap.get('Host', '') 
     
    228228        # _cpOnError will probably change cpg.response.body. 
    229229        # It may also change the headerMap, etc. 
    230         _cputil.getSpecialFunction('_cpOnError')() 
     230        _cputil.getSpecialAttribute('_cpOnError')() 
    231231         
    232232        finalize() 
     
    369369    if methodName in ('beforeRequestBody', 'beforeMain'): 
    370370        filterList = (_cpdefaults._cpDefaultInputFilterList + 
    371                       _cputil.getSpecialFunction('_cpFilterList')) 
     371                      _cputil.getSpecialAttribute('_cpFilterList')) 
    372372    elif methodName in ('beforeFinalize',): 
    373         filterList = (_cputil.getSpecialFunction('_cpFilterList') + 
     373        filterList = (_cputil.getSpecialAttribute('_cpFilterList') + 
    374374                      _cpdefaults._cpDefaultOutputFilterList) 
    375375    else: 
     
    377377        # 'beforeErrorResponse', 'afterErrorResponse' 
    378378        filterList = (_cpdefaults._cpDefaultInputFilterList + 
    379                       _cputil.getSpecialFunction('_cpFilterList') + 
     379                      _cputil.getSpecialAttribute('_cpFilterList') + 
    380380                      _cpdefaults._cpDefaultOutputFilterList) 
    381381    for filter in filterList: 
  • trunk/cherrypy/_cpserver.py

    r275 r277  
    128128    cpg._httpserver = serverClass() 
    129129     
    130     _cpLogMessage = _cputil.getSpecialFunction('_cpLogMessage') 
     130    _cpLogMessage = _cputil.getSpecialAttribute('_cpLogMessage') 
    131131     
    132132    servingWhat = "HTTP" 
  • trunk/cherrypy/_cputil.py

    r229 r277  
    4141    pass 
    4242 
    43 def getSpecialFunction(name): 
     43def getSpecialAttribute(name): 
    4444    """ Return the special function """ 
    4545 
  • trunk/cherrypy/_cpwsgi.py

    r253 r277  
    103103    except: 
    104104        tb = _cphttptools.formatExc() 
    105         _cputil.getSpecialFunction('_cpLogMessage')(tb) 
     105        _cputil.getSpecialAttribute('_cpLogMessage')(tb) 
    106106        s, h, b = _cphttptools.bareError(tb) 
    107107        # CherryPy test suite expects bareError body to be output, 
     
    231231        self.close_connection = 1 
    232232        msg = _cphttptools.formatExc(exc) 
    233         _cputil.getSpecialFunction('_cpLogMessage')(msg, "HTTP") 
     233        _cputil.getSpecialAttribute('_cpLogMessage')(msg, "HTTP") 
    234234        self.status, self.headers, body = _cphttptools.bareError() 
    235235        self.write(body) 
  • trunk/cherrypy/lib/autoreload.py

    r242 r277  
    5353            sys.exit(restart_with_reloader()) 
    5454        except KeyboardInterrupt: 
    55             _cputil.getSpecialFunction('_cpLogMessage')("<Ctrl-C> hit: shutting down autoreloader", "HTTP") 
     55            _cputil.getSpecialAttribute('_cpLogMessage')("<Ctrl-C> hit: shutting down autoreloader", "HTTP") 
  • trunk/cherrypy/lib/filter/sessionfilter/basesession.py

    r275 r277  
    9494         
    9595        if sessionKeyFunc: 
    96             newKey = cherrypy._cputil.getSpecialFunction(sessionKeyFunc)() 
     96            newKey = cherrypy._cputil.getSpecialAttribute(sessionKeyFunc)() 
    9797        else: 
    9898            s = '' 
  • trunk/cherrypy/lib/filter/sessionfilter/sessionfilter.py

    r275 r277  
    4848                if storageType: 
    4949                    try: 
    50                         cherrypy._cputil.getSpecialFunction(storageType) 
     50                        cherrypy._cputil.getSpecialAttribute(storageType) 
    5151                    except cherrypy.cperror.InternalError: 
    5252                        raise SessionBadStorageTypeError(storageType) 

Hosted by WebFaction

Log in as guest/cpguest to create tickets