Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
this upgrade step fixes browserlayer and Coordinates tab
and remove all components related to IGeoMarker event

        def upgrade_to_30(context):
    """this upgrade step fixes browserlayer and Coordinates tab
    and remove all components related to IGeoMarker event
    """
    context.runImportStepFromProfile(default_profile, 'browserlayer')
    context.runImportStepFromProfile(default_profile, 'actions')
    portal = getSite()
    sm = portal.getSiteManager()

    remove_utility = True
    try:
        from .interfaces import IGeoMarkerUtility
    except ImportError:
        remove_utility = False

    if remove_utility:
        util = sm.queryUtility(IGeoMarkerUtility)
        if util:
            sm.unregisterUtility(provided=IGeoMarkerUtility)
            del util
            assert sm.queryUtility(IGeoMarkerUtility) is None
        


src/c/o/collective.geo.bundle-2.1/src/collective/geo/bundle/upgrades.py   collective.geo.bundle(Download)
    # - collective.geo.contentlocations
    # add browserlayer, upgrade actions and remove IGeoMarkerUtility
    contentlocations.upgrades.upgrade_to_30(context)
 
    # - collective.geo.kml

src/c/o/collective.geo.bundle-HEAD/src/collective/geo/bundle/upgrades.py   collective.geo.bundle(Download)
    # - collective.geo.contentlocations
    # add browserlayer, upgrade actions and remove IGeoMarkerUtility
    contentlocations.upgrades.upgrade_to_30(context)
 
    # - collective.geo.kml