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

Changeset 1610

Show
Ignore:
Timestamp:
02/05/07 11:12:22
Author:
fumanchu
Message:

Allow expose to work (without alias) on platforms that don't have getframe.

Files:

Legend:

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

    r1608 r1610  
    325325     
    326326    import sys, types 
    327     parents = sys._getframe(1).f_locals 
    328327    if isinstance(func, (types.FunctionType, types.MethodType)): 
    329328        # expose is being called directly, before the method has been bound 
     329        parents = sys._getframe(1).f_locals 
    330330        return expose_(func) 
    331331    else: 
     
    336336        else: 
    337337            # expose is returning a decorator "@expose(alias=...)" 
     338            parents = sys._getframe(1).f_locals 
    338339            return expose_ 
    339340 

Hosted by WebFaction

Log in as guest/cpguest to create tickets