Robert Brewer  committed df72edf

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

  • Participants
  • Parent commits d5b41d5

Comments (0)

Files changed (1)

File cherrypy/

         return func
     import sys, types
-    parents = sys._getframe(1).f_locals
     if isinstance(func, (types.FunctionType, types.MethodType)):
         # expose is being called directly, before the method has been bound
+        parents = sys._getframe(1).f_locals
         return expose_(func)
         if alias is None:
             return func
             # expose is returning a decorator "@expose(alias=...)"
+            parents = sys._getframe(1).f_locals
             return expose_
 def url(path="", qs="", script_name=None, base=None, relative=False):