Changeset 2920 in products for quintagroup.plonegooglesitemaps/branches/blacklist/quintagroup/plonegooglesitemaps/utilities.py
- Timestamp:
- Oct 22, 2010 12:54:50 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.plonegooglesitemaps/branches/blacklist/quintagroup/plonegooglesitemaps/utilities.py
r2912 r2920 19 19 def filterOut(self, fdata, fkey, **kwargs): 20 20 """Filter-out fdata list by path in fkey.""" 21 return [b for b in fdata if b.getPath() != fkey] 21 if fkey.startswith("/"): 22 return [b for b in fdata if b.getPath() != fkey] 23 elif fkey.startswith("./"): 24 # Add relative path filter 25 smpath = kwargs.get("sitemap") 26 contpath = '/'.join(smpath.getPhysicalPath()[1:-1]) 27 resfilter = contpath + fkey[1:] 28 return [b for b in fdata if b.getPath() != resfilter] 29 return fdata
Note: See TracChangeset
for help on using the changeset viewer.