Ignore:
Timestamp:
Apr 20, 2011 8:20:36 AM (9 years ago)
Author:
zidane
Message:

fixes pep8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/upgrades.py

    r2602 r3152  
    77 
    88convertor = None 
     9 
    910 
    1011def migrateCanonical(plone_tools): 
     
    1718    portal = purl.getPortalObject() 
    1819    allCTTypes = types.listContentTypes() 
    19     obj_metatypes =  [m.content_meta_type for m in types.objectValues() \ 
    20                       if m.getId() in allCTTypes]  
     20    obj_metatypes = [m.content_meta_type for m in types.objectValues() \ 
     21                     if m.getId() in allCTTypes] 
    2122    convertor = CanonicalConvertor(portal_url=purl()) 
    2223    portal.ZopeFindAndApply( 
     
    2829    print convertor.getLogs() 
    2930 
     31 
    3032def renameProperty(obj, path): 
    3133    """ Migrate canonical_path property into canonical_link 
     
    3537        convertor.convertIPathToLink(obj) 
    3638 
     39 
    3740def upgrade_1_0_to_1_1(setuptool): 
    3841    """ Upgrade quintagroup.plonegooglesitemaps from version 1.0 to 1.1. 
    3942    """ 
    40     setuptool.runAllImportStepsFromProfile('profile-quintagroup.plonegooglesitemaps:upgrade_1_0_to_1_1') 
     43    profile_name = 'profile-quintagroup.plonegooglesitemaps:upgrade_1_0_to_1_1' 
     44    setuptool.runAllImportStepsFromProfile(profile_name) 
     45 
    4146 
    4247def upgrade_1_1_to_1_2(setuptool): 
    4348    """ Upgrade quintagroup.plonegooglesitemaps from version 1.1 to 1.2. 
    4449    """ 
    45     plone_tools = queryMultiAdapter((setuptool, setuptool.REQUEST), name="plone_tools") 
     50    plone_tools = queryMultiAdapter((setuptool, setuptool.REQUEST), 
     51                                    name="plone_tools") 
    4652    migrateCanonical(plone_tools) 
    47     setuptool.runAllImportStepsFromProfile('profile-quintagroup.plonegooglesitemaps:upgrade_1_1_to_1_2') 
     53    profile_name = 'profile-quintagroup.plonegooglesitemaps:upgrade_1_1_to_1_2' 
     54    setuptool.runAllImportStepsFromProfile(profile_name) 
Note: See TracChangeset for help on using the changeset viewer.