Commit 5afaef9e authored by Hanno Schlichting's avatar Hanno Schlichting

Make the cleanup code more fail-safe

parent 8f06ece1
...@@ -199,8 +199,9 @@ def cleanUp(): ...@@ -199,8 +199,9 @@ def cleanUp():
_registered_packages = [] _registered_packages = []
global _meta_type_regs global _meta_type_regs
Products.meta_types = tuple([ info for info in Products.meta_types old = getattr(Products, 'meta_types', ())
if info['name'] not in _meta_type_regs ]) new = tuple([info for info in old if info['name'] not in _meta_type_regs])
setattr(Products, 'meta_types', new)
_meta_type_regs = [] _meta_type_regs = []
......
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