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

Changeset 861

Show
Ignore:
Timestamp:
12/06/05 09:10:11
Author:
rdelon
Message:

Fix for #405: Try old name first

Files:

Legend:

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

    r860 r861  
    5555    return objectTrail 
    5656 
    57 def get_special_attribute(name, alternate_name = None): 
     57def get_special_attribute(name, old_name = None): 
    5858    """Return the special attribute. A special attribute is one that 
    5959    applies to all of the children from where it is defined, such as 
     
    7272     
    7373    try: 
    74         return globals()[name] 
     74        if old_name: 
     75            return globals()[old_name] 
     76        else: 
     77            return globals()[name] 
    7578    except KeyError: 
    76         if alternate_name: 
    77             return get_special_attribute(alternate_name) 
     79        if old_name: 
     80            return get_special_attribute(name) 
    7881        msg = "Special attribute %s could not be found" % repr(name) 
    7982        raise cherrypy.HTTPError(500, msg) 

Hosted by WebFaction

Log in as guest/cpguest to create tickets