Commit 7bfd58bc authored by Jim Fulton's avatar Jim Fulton

Added logic to stuff base class ZClasses created in registerBaseClass

into the package so they would be picklable.
parent 6dbc2cff
......@@ -230,8 +230,14 @@ class ProductContext:
def registerBaseClass(self, base_class, meta_type=None):
class Z: pass
d={}
zname='_ZClass_for_'+base_class.__name__
exec 'class %s: pass' % zname in d
Z=d[zname]
Z.propertysheets=OFS.PropertySheets.PropertySheets()
Z._zclass_=base_class
Z.manage_options=()
pack=self.__pack
Z.__module__=pack.__name__
setattr(pack, zname, Z)
return self.registerZClass(Z, meta_type)
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