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

fixes pep8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/browser/utils.py

    r2181 r3152  
    1414_marker = [] 
    1515 
     16 
    1617def searchAndReplace(string, what, withs): 
    1718    """Emulate sed command s/""" 
    18     res = re.sub(what,withs,string) 
     19    res = re.sub(what, withs, string) 
    1920    return res 
    20 OPERATORS = {'s': searchAndReplace,} 
     21OPERATORS = {'s': searchAndReplace, } 
     22 
    2123 
    2224def applyOperations(objects, operations): 
    2325    """Parse Operations """ 
    24     operations=[OPERATIONS_PARSE.match(op).groups() for op in operations] 
     26    operations = [OPERATIONS_PARSE.match(op).groups() for op in operations] 
    2527    result = {} 
    2628    for ob in objects: 
     
    3840        if url in result.keys(): 
    3941            continue 
    40         #TODO: replace brain with only data necessary to  
     42        #TODO: replace brain with only data necessary to 
    4143        #generate sitemap 
    42         result[url]=ob 
     44        result[url] = ob 
    4345    return result 
     46 
    4447 
    4548def additionalURLs(context): 
     
    4952    plone_home = getToolByName(context, 'portal_url')() 
    5053    root = context.getPhysicalRoot().absolute_url() 
    51     URLs =  context.getUrls() 
     54    URLs = context.getUrls() 
    5255 
    5356    for url in URLs: 
    5457        if ADD_ZOPE.match(url): 
    55             res.append(root+url) 
     58            res.append(root + url) 
    5659        elif ADD_PLONE.match(url): 
    57             res.append(plone_home+'/'+url) 
     60            res.append(plone_home + '/' + url) 
    5861        else: 
    5962            res.append(url) 
Note: See TracChangeset for help on using the changeset viewer.