Ignore:
Timestamp:
May 25, 2010 6:17:59 PM (11 years ago)
Author:
mylan
Message:

#250: Fixed and added test for reinstallation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/Extensions/Install.py

    r2376 r2384  
     1import logging 
    12from Products.CMFCore.utils import getToolByName 
    23from Products.GenericSetup.upgrade import _upgrade_registry 
    34 
     5logger = logging.getLogger("quintagroup.plonegooglesitemaps") 
    46PROFILE = "profile-quintagroup.plonegooglesitemaps:default" 
    57 
     
    1618        step = None 
    1719        profile_id = 'quintagroup.plonegooglesitemaps:default' 
    18         steps_to_run = [s['id'] for s in setup_tool.listUpgrades(profile_id, show_old=False)] 
     20        steps_to_run = [s['id'] for s in ps.listUpgrades(profile_id, show_old=False)] 
    1921        for step_id in steps_to_run: 
    2022            step = _upgrade_registry.getUpgradeStep(profile_id, step_id) 
    21             step.doStep(setup_tool) 
     23            step.doStep(ps) 
    2224            msg = "Ran upgrade step %s for profile %s" % (step.title, profile_id) 
    2325            logger.log(logging.INFO, msg) 
     
    2527        # with running an upgrade step. 
    2628        if step and step.dest is not None and step.checker is None: 
    27            setup_tool.setLastVersionForProfile(profile_id, step.dest) 
     29           ps.setLastVersionForProfile(profile_id, step.dest) 
    2830        return "Ran all reinstall steps." 
    2931 
Note: See TracChangeset for help on using the changeset viewer.