from Products.CMFCore.utils import getToolByName import logging PROFILE_ID = 'profile-waeup.plonetheme.ngren3:default' def common(context, logger=None): if logger is None: # Called as upgrade step: define our own logger. logger = logging.getLogger('waeup.plonetheme.ngren3') setup = getToolByName(context, 'portal_setup') setup.runAllImportStepsFromProfile(PROFILE_ID) logger.info("Migrated from previous version")