You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-commits@quetz.apache.org by gr...@apache.org on 2003/09/02 22:44:19 UTC

cvs commit: httpd-python/lib/python/mod_python psp.py

grisha      2003/09/02 13:44:19

  Modified:    lib/python/mod_python psp.py
  Log:
  Fix the problem with exec statement scope in psp.py
  
  Submitted by:	Sean Treadway
  
  Revision  Changes    Path
  1.21      +6 -3      httpd-python/lib/python/mod_python/psp.py
  
  Index: psp.py
  ===================================================================
  RCS file: /home/cvs/httpd-python/lib/python/mod_python/psp.py,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- psp.py	28 Aug 2003 18:49:14 -0000	1.20
  +++ psp.py	2 Sep 2003 20:44:19 -0000	1.21
  @@ -258,8 +258,11 @@
   
       try:
           try:
  -            exec code in globals(), {"req":req, "session":session,
  -                                     "form":form, "psp":psp}
  +            global_scope = globals().copy()
  +            global_scope.update({"req":req, "session":session,
  +                                 "form":form, "psp":psp})
  +            exec code in global_scope
  +
               # the mere instantiation of a session changes it
               # (access time), so it *always* has to be saved
               if session: