Commit 690a5a6c authored by Chris McDonough's avatar Chris McDonough

The transient object container named 'session_data' was not created in the...

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
parent e8fcc0e5
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
############################################################################## ##############################################################################
__doc__='''Application support __doc__='''Application support
$Id: Application.py,v 1.183 2002/04/12 16:06:01 Brian Exp $''' $Id: Application.py,v 1.184 2002/07/03 18:18:57 chrism Exp $'''
__version__='$Revision: 1.183 $'[11:-2] __version__='$Revision: 1.184 $'[11:-2]
import Globals,Folder,os,sys,App.Product, App.ProductRegistry, misc_ import Globals,Folder,os,sys,App.Product, App.ProductRegistry, misc_
import time, traceback, os, Products import time, traceback, os, Products
...@@ -30,6 +30,7 @@ from misc_ import Misc_ ...@@ -30,6 +30,7 @@ from misc_ import Misc_
import ZDOM import ZDOM
from zLOG import LOG, ERROR, WARNING, INFO from zLOG import LOG, ERROR, WARNING, INFO
from HelpSys.HelpSys import HelpSys from HelpSys.HelpSys import HelpSys
from Acquisition import aq_base
class Application(Globals.ApplicationDefaultPermissions, class Application(Globals.ApplicationDefaultPermissions,
ZDOM.Root, Folder.Folder, ZDOM.Root, Folder.Folder,
...@@ -174,7 +175,7 @@ class Application(Globals.ApplicationDefaultPermissions, ...@@ -174,7 +175,7 @@ class Application(Globals.ApplicationDefaultPermissions,
finished = finished_dict.has_key finished = finished_dict.has_key
while items: while items:
name, ob = items.pop() name, ob = items.pop()
base=getattr(ob, 'aq_base', ob) base=aq_base(ob)
if finished(id(base)): if finished(id(base)):
continue continue
finished_dict[id(base)] = None finished_dict[id(base)] = None
...@@ -261,7 +262,7 @@ def initialize(app): ...@@ -261,7 +262,7 @@ def initialize(app):
app.Control_Panel.initialize_cache() app.Control_Panel.initialize_cache()
# b/c: Ensure that a ProductFolder exists. # 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() app.Control_Panel.Products=App.Product.ProductFolder()
get_transaction().note('Added Control_Panel.Products') get_transaction().note('Added Control_Panel.Products')
get_transaction().commit() get_transaction().commit()
...@@ -278,7 +279,7 @@ def initialize(app): ...@@ -278,7 +279,7 @@ def initialize(app):
# Ensure that there is a transient container in the temp folder # Ensure that there is a transient container in the temp folder
tf = app.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 env_has = os.environ.get
from Products.Transience.Transience import TransientObjectContainer from Products.Transience.Transience import TransientObjectContainer
addnotify = env_has('ZSESSION_ADD_NOTIFY', None) addnotify = env_has('ZSESSION_ADD_NOTIFY', None)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment