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

Changeset 708

Show
Ignore:
Timestamp:
10/03/05 11:57:58
Author:
fumanchu
Message:

NotFound? path arg now defaults to cherrypy.request.path.

Files:

Legend:

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

    r707 r708  
    209209    """ Happens when a URL couldn't be mapped to any class.method """ 
    210210     
    211     def __init__(self, path): 
     211    def __init__(self, path=None): 
     212        if path is None: 
     213            path = cherrypy.request.path 
    212214        self.args = (path,) 
    213215        HTTPError.__init__(self, 404, "The path %s was not found." % repr(path)) 
  • trunk/cherrypy/lib/cptools.py

    r682 r708  
    128128                except TypeError: 
    129129                    pass 
    130             raise cherrypy.NotFound(cherrypy.request.path
     130            raise cherrypy.NotFound(
    131131    default.exposed = True 
    132132 
     
    247247        if getattr(cherrypy, "debug", None): 
    248248            cherrypy.log("    NOT FOUND file: %s" % path, "DEBUG") 
    249         raise cherrypy.NotFound(cherrypy.request.path
     249        raise cherrypy.NotFound(
    250250     
    251251    if contentType is None: 

Hosted by WebFaction

Log in as guest/cpguest to create tickets