Back to index

plone3  3.1.7
__init__.py
Go to the documentation of this file.
00001 """\
00002 Unit test package for CMFEditions
00003 """
00004 
00005 def installProduct(portal, name, optional=False):
00006     """Use this to optionaly load products.
00007     
00008     Returns True if a product could be installed.
00009     """
00010     quickinstaller = portal.portal_quickinstaller
00011     if optional:
00012         try:
00013             quickinstaller.installProduct(name)
00014         except AttributeError:
00015             return False
00016     else:
00017         quickinstaller.installProduct(name)
00018     return True