[Zope3-checkins] CVS: Zope3/src/zope/proxy/context - __init__.py:1.8.2.4

Steve Alexander steve@cat-box.net
Mon, 19 May 2003 09:35:21 -0400


Update of /cvs-repository/Zope3/src/zope/proxy/context
In directory cvs.zope.org:/tmp/cvs-serv13924/src/zope/proxy/context

Modified Files:
      Tag: stevea-decorators-branch
	__init__.py 
Log Message:
Create a wrapper dict if one does not already exist.


=== Zope3/src/zope/proxy/context/__init__.py 1.8.2.3 => 1.8.2.4 ===
--- Zope3/src/zope/proxy/context/__init__.py:1.8.2.3	Fri May 16 12:32:15 2003
+++ Zope3/src/zope/proxy/context/__init__.py	Mon May 19 09:35:20 2003
@@ -22,7 +22,7 @@
 
 from zope.interface import moduleProvides
 from zope.security.proxy import Proxy, getChecker, getObject
-from zope.proxy.context.wrapper import getobject, getdict
+from zope.proxy.context.wrapper import getobject, getdict, getdictcreate
 from zope.proxy.context.wrapper import setcontext, getcontext, getinnercontext
 from zope.proxy.context.wrapper import getinnerwrapper, getbaseobject
 from zope.proxy.context.wrapper import ContextDescriptor, ContextAware
@@ -87,7 +87,7 @@
     if type(unproxied_ob) not in wrapperTypes:
         return ContextWrapper(_ob, _parent, **kw)
     else:
-        getdict(unproxied_ob).update(kw)
+        getdictcreate(unproxied_ob).update(kw)
         setcontext(unproxied_ob, _parent)
         return _ob