Changeset 3438 for WAeUP_SRP/base/skins
- Timestamp:
- 16 Apr 2008, 07:04:19 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_utilities/fillApplicationCategory.py
r3436 r3438 1 ## Script (Python) " ti_507_resolve"1 ## Script (Python) "fillApplicationCategory" 2 2 ##bind container=container 3 3 ##bind context=context … … 36 36 logger.info('start') 37 37 count = 0 38 not_count = 0 38 39 found = 0 39 40 commit_after = 1000 … … 41 42 certificates = context.portal_catalog.search({'meta_type': "Certificate"}) 42 43 logger.info("found %d certificates" % len(certificates)) 43 cat = {'cos': ' BASIC',44 'cos_cest': ' CEST',45 'cos_sandwich': ' SANDWICH',44 cat = {'cos': 'basic', 45 'cos_cest': 'cest', 46 'cos_sandwich': 'sandwich', 46 47 } 47 48 to_change = {} … … 59 60 logger.info("%s in %s" % (cert.id,','.join(found))) 60 61 count += 1 62 else: 63 not_count += 1 64 logger.info("%s not in vocabularies" % (cert.id,)) 61 65 for cert,d in to_change.items(): 62 66 d['cert_doc'].edit(mapping = d) 63 logger.info("set application_category of %s to %s" % 67 logger.info("set application_category of %s to %s" % 64 68 (cert,d['application_category'])) 65 logger.info(" found %d not in vocabularies" % count)69 logger.info("%d cert codes found, %d not found in vocabularies" % (count,not_count))
Note: See TracChangeset for help on using the changeset viewer.