Changeset 1936 for WAeUP_SRP/trunk
- Timestamp:
- 19 Jun 2007, 09:06:41 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/PatchCatalogToolXMLAdapter.py
r1935 r1936 8 8 """ 9 9 na = node.attributes.items() 10 not_found = False10 something_changed = False 11 11 new_indexes = [] 12 12 new_columns = [] 13 13 meta_type = na[0][1] 14 14 name = na[1][1] 15 print name,meta_type,len(self.context())16 15 if self.environ.shouldPurge(): 17 #import pdb;pdb.set_trace()18 16 self._purgeProperties() 19 17 self._purgeObjects() … … 23 21 for col in self._extractColumns()._get_childNodes(): 24 22 columns.append(col.attributes.items()[0][1]) 25 #print "cols: ",columns26 23 inds = {} 27 24 for ind in self._extractIndexes()._get_childNodes(): 28 25 inds[ind.attributes.items()[1][1]] = ind.attributes.items()[0][1] 29 #print ind.attributes.items() 30 if meta_type in ("WAeUP Table") and name != "portal_catalog_real": 26 if meta_type in ('CMF Catalog',"WAeUP Table"): 31 27 for ch in node._get_childNodes(): 32 28 if ch.nodeName in ('index',): … … 37 33 continue 38 34 new_indexes.append(iname) 39 not_found = True35 something_changed = True 40 36 elif ch.nodeName in ('column',): 41 37 cha = ch.attributes.items() … … 44 40 continue 45 41 new_columns.append(iname) 46 not_found = True42 something_changed = True 47 43 else: 48 44 continue 49 if not_found :45 if something_changed : 50 46 self._logger.info("Catalog tool %s cleared." % na[1][1]) 51 47 self._logger.info("%s modified." % na[1][1]) … … 57 53 #self._refreshCatalog() 58 54 59 self._logger.info("Catalog too ool %s imported." % na[1][1])55 self._logger.info("Catalog tool %s imported." % na[1][1]) 60 56 61 57 from Products.CPSCore.exportimport.catalog import CatalogToolXMLAdapter
Note: See TracChangeset for help on using the changeset viewer.