Changeset 4486 for waeup/branches/ulif-rewrite/src
- Timestamp:
- 30 Jul 2009, 01:23:27 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-rewrite/src/waeup/university/certificate.py
r4484 r4486 5 5 from zope.app.catalog.interfaces import ICatalog 6 6 from zope.component import getUtility 7 from zope.component.interfaces import IFactory 7 from zope.component.interfaces import IFactory, ComponentLookupError 8 8 from zope.interface import implementedBy 9 9 from waeup.interfaces import (ICertificate, ICertificateContainer, … … 55 55 """ 56 56 for key in self.keys(): 57 if self[key].getCourseCode != code:57 if self[key].getCourseCode() != code: 58 58 continue 59 59 del self[key] … … 111 111 112 112 # Find all certcourses that reference the given course... 113 cat = getUtility(ICatalog, name='certcourses_catalog') 113 try: 114 cat = getUtility(ICatalog, name='certcourses_catalog') 115 except ComponentLookupError: 116 # catalog not available. This might happen during tests. 117 return 118 114 119 results = cat.searchResults(course_code=(code, code)) 115 120 for certcourse in results:
Note: See TracChangeset for help on using the changeset viewer.