Commit 451c84d9 authored by Jim Fulton's avatar Jim Fulton

Modified to work with ZODB3.

parent e832d0c5
...@@ -86,10 +86,12 @@ ...@@ -86,10 +86,12 @@
Objects for packages that have been uninstalled. Objects for packages that have been uninstalled.
""" """
import string, SimpleItem, Globals, Acquisition import string, SimpleItem, Globals, Acquisition
import Persistence
broken_klasses={} broken_klasses={}
class BrokenClass(SimpleItem.Item, Acquisition.Explicit): class BrokenClass(Acquisition.Explicit, SimpleItem.Item,
Persistence.Persistent):
_p_changed=0 _p_changed=0
meta_type='Broken Because Product is Gone' meta_type='Broken Because Product is Gone'
icon='p_/broken' icon='p_/broken'
...@@ -102,7 +104,13 @@ class BrokenClass(SimpleItem.Item, Acquisition.Explicit): ...@@ -102,7 +104,13 @@ class BrokenClass(SimpleItem.Item, Acquisition.Explicit):
is no longer installed. It cannot be updated. is no longer installed. It cannot be updated.
""") """)
def __getattr__(self, name):
if name[:3]=='_p_':
return BrokenClass.inheritedAttribute('__getattr__')(self, name)
raise AttributeError, name
manage=manage_main=Globals.HTMLFile('brokenEdit',globals()) manage=manage_main=Globals.HTMLFile('brokenEdit',globals())
manage_workspace=manage
def Broken(self, oid, klass): def Broken(self, oid, klass):
...@@ -126,6 +134,7 @@ def Broken(self, oid, klass): ...@@ -126,6 +134,7 @@ def Broken(self, oid, klass):
'This object\'s class was %s in module %s.' % 'This object\'s class was %s in module %s.' %
(klass.__name__, klass.__module__)) (klass.__name__, klass.__module__))
if oid is None: return klass
i=klass() i=klass()
i._p_oid=oid i._p_oid=oid
i._p_jar=self i._p_jar=self
......
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