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

Changeset 2039

Show
Ignore:
Timestamp:
09/27/08 14:22:10
Author:
fumanchu
Message:

Fix for #848 ("and root" should be "and root is not None").

Files:

Legend:

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

    r1989 r2039  
    154154        root: an instance of a "controller class" (a collection of page 
    155155            handler methods) which represents the root of the application. 
     156            This may also be an Application instance, or None if using 
     157            a dispatcher other than the default. 
    156158        script_name: a string containing the "mount point" of the application. 
    157159            This should start with a slash, and be the path portion of the 
     
    173175             
    174176            # If mounted at "", add favicon.ico 
    175             if script_name == "" and root and not hasattr(root, "favicon_ico"): 
     177            if (script_name == "" and root is not None 
     178                    and not hasattr(root, "favicon_ico")): 
    176179                favicon = os.path.join(os.getcwd(), os.path.dirname(__file__), 
    177180                                       "favicon.ico") 

Hosted by WebFaction

Log in as guest/cpguest to create tickets