Changeset 2181 in products for quintagroup.plonegooglesitemaps
- Timestamp:
- Apr 20, 2010 1:03:57 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/browser/utils.py
r2169 r2181 14 14 _marker = [] 15 15 16 def searchAndReplace(string, what, with ):16 def searchAndReplace(string, what, withs): 17 17 """Emulate sed command s/""" 18 res = re.sub(what,with ,string)18 res = re.sub(what,withs,string) 19 19 return res 20 20 OPERATORS = {'s': searchAndReplace,} … … 30 30 if url in [Missing_Value, _marker]: 31 31 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("\\", "")) 34 34 #TODO: Remove or replace following condition 35 35 #it is senseless in the case we need intelligent
Note: See TracChangeset
for help on using the changeset viewer.