Am 13.10.2006 um 17:29 schrieb Tres Seaver:

That should work.  However, I think I would rather do "capability
checks" than "version checks", e.g.::

      from Products.CMFCore.permissions import AddPortalContent
  except ImportError:  # BBB, CMF < 1.5
      from Products.CMFCore.CMFCorePermissions import AddPortalContent

I agree with this in general but still think there should be a general way of checking the version of a Product just like Zope has getZopeVersion() because that might help work out where to import from. I was just surprised by the way it was done in this particular module which if I read shouldn't even get imported in CMFCore is around and then I looked at the Plone installer which does it's own file system search, ie. I realise this isn't a CMF issue but thought which version of the CMF is running might be important to a lot of things out there.

Should I punt this to the zope-dev lot? Simply factoring out the version checking code from App.Product.initialize_product() should do the trick.

Charlie Clark
Helmholtzstr. 20
D- 40215
Tel: +49-211-938-5360
GSM: +49-178-782-6226

Zope-CMF maillist  -

See for bug reports and feature requests

Reply via email to