[Zope] Annoying when objectValues() doesn't work
Peter Bengtsson
peter at fry-it.com
Thu Jul 3 10:41:52 EDT 2008
from cStringIO import StringIO
def workflowscripts2methods(self):
out = StringIO()
print >>out, "Star converting workflow scripts into External Methods"
pw = self.portal_workflow
for workflow in pw.objectValues('Workflow'):
for container in workflow.objectValues('Workflow Scripts'):
meta_type = 'Script (Python)'
for script in container.objectValues(meta_type):
assert script.meta_type == meta_type
print >>out, "script (%r, %s)" % (script.meta_type,
script.absolute_url_path())
value = out.getvalue()
print value
return value
I'm getting an AssertionError on this!!!
After having used objectValues() for so many many years without much
trouble my confidence in it just dropped.
Anybody else seen something like this?
--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
More information about the Zope
mailing list