[Zope-Checkins] CVS: Zope/lib/python/OFS - Application.py:1.184

Chris McDonough chrism@zope.com
Wed, 3 Jul 2002 14:18:57 -0400


Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv18600

Modified Files:
	Application.py 
Log Message:
The transient object container named 'session_data' was not created in the temp_folder if there was an acquirable object named 'session_data' in the root

=== Zope/lib/python/OFS/Application.py 1.183 => 1.184 ===
 from zLOG import LOG, ERROR, WARNING, INFO
 from HelpSys.HelpSys import HelpSys
+from Acquisition import aq_base
 
 class Application(Globals.ApplicationDefaultPermissions,
                   ZDOM.Root, Folder.Folder,
@@ -174,7 +175,7 @@
             finished = finished_dict.has_key
             while items:
                 name, ob = items.pop()
-                base=getattr(ob, 'aq_base', ob)
+                base=aq_base(ob)
                 if finished(id(base)):
                     continue
                 finished_dict[id(base)] = None
@@ -261,7 +262,7 @@
     app.Control_Panel.initialize_cache()
 
     # b/c: Ensure that a ProductFolder exists.
-    if not hasattr(app.Control_Panel.aq_base, 'Products'):
+    if not hasattr(aq_base(app.Control_Panel), 'Products'):
         app.Control_Panel.Products=App.Product.ProductFolder()
         get_transaction().note('Added Control_Panel.Products')
         get_transaction().commit()
@@ -278,7 +279,7 @@
         
     # Ensure that there is a transient container in the temp folder
     tf = app.temp_folder
-    if not hasattr(tf, 'session_data'):
+    if not hasattr(aq_base(tf), 'session_data'):
         env_has = os.environ.get
         from Products.Transience.Transience import TransientObjectContainer
         addnotify = env_has('ZSESSION_ADD_NOTIFY', None)