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

Changeset 663

Show
Ignore:
Timestamp:
09/19/05 14:01:24
Author:
fumanchu
Message:

Moved responseCodes to _cputil (DRY).

Files:

Legend:

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

    r650 r663  
    3232 
    3333import cgi 
    34  
    35 from BaseHTTPServer import BaseHTTPRequestHandler 
    36 responseCodes = BaseHTTPRequestHandler.responses 
    3734 
    3835import Cookie 
     
    544541        if reason is None: 
    545542            try: 
    546                 reason = responseCodes[code][0] 
     543                reason = _cputil.responseCodes[code][0] 
    547544            except (KeyError, IndexError): 
    548545                reason = "" 
  • trunk/cherrypy/_cputil.py

    r644 r663  
    3636import os 
    3737#import os.path 
     38 
     39from BaseHTTPServer import BaseHTTPRequestHandler 
     40responseCodes = BaseHTTPRequestHandler.responses 
    3841 
    3942import cherrypy 
     
    183186    ''' % subTuple 
    184187 
    185 import BaseHTTPServer 
    186 _HTTPResponses = BaseHTTPServer.BaseHTTPRequestHandler.responses 
    187  
    188188def getErrorStatusAndPage(status, traceback = None): 
    189     statusString, message = _HTTPResponses[status] 
     189    statusString, message = responseCodes[status] 
    190190    statusString = '%d %s' % (status, statusString) 
    191191     

Hosted by WebFaction

Log in as guest/cpguest to create tickets