
gotcha at bubblenet
Mar 2, 2011, 5:59 AM
Post #1 of 8
(862 views)
Permalink
|
|
GenericSetup import and export step registries
|
|
Hi, I have been looking at GenericSetup tool.py. The order in which global and local registries are queried is different in getImportStep and getExportStep on one side and in getImportStepMetadata and getExportStepMetadata on the other side. See below: def getExportStep(self, step, default=None): """Simple wrapper to query both the global and local step registry.""" res=_export_step_registry.getStep(step, default) if res is not default: return res return self._export_registry.getStep(step, default) def getExportStepMetadata(self, step, default=None): """Simple wrapper to query both the global and local step registry.""" res=self._export_registry.getStepMetadata(step, default) if res is not default: return res return _export_step_registry.getStepMetadata(step, default) I have looked at the SVN history and it seems that there has been merging problems. In line with usual ZCA pattern which queries local before global, I guess that the local registry should be queried before the global like in getImportStepMetadata and getExportStepMetadata. IOW, it seems it should be : def getExportStep(self, step, default=None): """Simple wrapper to query both the global and local step registry.""" res=self._export_step_registry.getStep(step, default) if res is not default: return res return _export_registry.getStep(step, default) def getExportStepMetadata(self, step, default=None): """Simple wrapper to query both the global and local step registry.""" res=self._export_registry.getStepMetadata(step, default) if res is not default: return res return _export_step_registry.getStepMetadata(step, default) Can someone confirm ? -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be _______________________________________________ Zope-CMF maillist - Zope-CMF [at] zope https://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests
|