Ignore:
Timestamp:
Apr 20, 2010 1:03:57 PM (14 years ago)
Author:
kroman0
Message:

Replace 'with' because it is reserved word in py>2.4

File:
1 edited

Legend:

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

    r2169 r2181  
    1414_marker = [] 
    1515 
    16 def searchAndReplace(string, what, with): 
     16def searchAndReplace(string, what, withs): 
    1717    """Emulate sed command s/""" 
    18     res = re.sub(what,with,string) 
     18    res = re.sub(what,withs,string) 
    1919    return res 
    2020OPERATORS = {'s': searchAndReplace,} 
     
    3030        if url in [Missing_Value, _marker]: 
    3131            url = ICanonicalLink(ob.getObject()).canonical_link 
    32         for operator, what, with in operations: 
    33             url = OPERATORS[operator](url, what, with.replace("\\", "")) 
     32        for operator, what, withs in operations: 
     33            url = OPERATORS[operator](url, what, withs.replace("\\", "")) 
    3434        #TODO: Remove or replace following condition 
    3535        #it is senseless in the case we need intelligent 
Note: See TracChangeset for help on using the changeset viewer.