Index: /main/waeup.sirp/trunk/src/waeup/sirp/catalog.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/catalog.py	(revision 6206)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/catalog.py	(revision 6207)
@@ -15,47 +15,46 @@
 
 class WAeUPQuery(Query):
-     """A hurry.query-like query that supports also ``apply``.
-     """
-     grok.implements(IQuery)
+    """A hurry.query-like query that supports also ``apply``.
+    """
+    grok.implements(IQuery)
 
-     def apply(self, query):
-          """Get a catalog's BTree set of intids conforming to a query.
-          """
-          return query.apply()
+    def apply(self, query):
+        """Get a catalog's BTree set of intids conforming to a query.
+        """
+        return query.apply()
 
-     def searchResults(self, query):
-          """Get a set of ZODB objects conforming to a query.
-          """
-          results = self.apply(query)
-          if results is not None:
-               uidutil = getUtility(IIntIds)
-               results = ResultSet(results, uidutil)
-          return results
+    def searchResults(self, query):
+        """Get a set of ZODB objects conforming to a query.
+        """
+        results = self.apply(query)
+        if results is not None:
+            uidutil = getUtility(IIntIds)
+            results = ResultSet(results, uidutil)
+        return results
 
 grok.global_utility(WAeUPQuery)
 
+class StudentIndexes(grok.Indexes):
+    grok.site(University)
+    grok.name('students_catalog')
+    grok.context(IStudent)
 
-class StudentIndexes(grok.Indexes):
-     grok.site(University)
-     grok.name('students_catalog')
-     grok.context(IStudent)
-
-     name = grok.index.Field(attribute='name')
+    name = grok.index.Field(attribute='name')
 
 class QueryResultItem(object):
-     grok.implements(IQueryResultItem)
-     url = None
-     title = None
-     description = None
+    grok.implements(IQueryResultItem)
+    url = None
+    title = None
+    description = None
 
-     def __init__(self, context, view):
-          self.context = context
-          self.url = view.url(context)
-          self.title = context.title
-          self.description = ''
+    def __init__(self, context, view):
+        self.context = context
+        self.url = view.url(context)
+        self.title = context.title
+        self.description = ''
 
 def search_context(query):
-     result = Query().searchResults(
-          Eq(('students_catalog', 'name'), query)
-          )
-     return result
+    result = Query().searchResults(
+        Eq(('students_catalog', 'name'), query)
+        )
+    return result
Index: /main/waeup.sirp/trunk/src/waeup/sirp/university/catalog.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/university/catalog.py	(revision 6206)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/university/catalog.py	(revision 6207)
@@ -3,92 +3,84 @@
 import grok
 from hurry.query import Eq
-try:
-     from zope.catalog.interfaces import ICatalog
-except ImportError:
-     # BBB
-     from zope.app.catalog.interfaces import ICatalog
+from zope.catalog.interfaces import ICatalog
 from zope.component import getUtility
 from zope.component.interfaces import ComponentLookupError
-try:
-     from zope.intid import IIntIds
-except ImportError:
-     # BBB
-     from zope.app.intid.interfaces import IIntIds
+from zope.intid import IIntIds
 from waeup.sirp.interfaces import IUniversity
 from waeup.sirp.catalog import QueryResultItem
 from waeup.sirp.university.interfaces import (
-     ICourse, ICertificateCourse, IDepartment,
-     )
+    ICourse, ICertificateCourse, IDepartment,
+    )
 
 class CourseIndexes(grok.Indexes):
-     grok.site(IUniversity)
-     grok.name('courses_catalog')
-     grok.context(ICourse)
+    grok.site(IUniversity)
+    grok.name('courses_catalog')
+    grok.context(ICourse)
 
-     code = grok.index.Field(attribute='code')
-     title = grok.index.Text(attribute='title')
+    code = grok.index.Field(attribute='code')
+    title = grok.index.Text(attribute='title')
 
 class CourseCertificatesIndexes(grok.Indexes):
-     grok.site(IUniversity)
-     grok.name('certcourses_catalog')
-     grok.context(ICertificateCourse)
+    grok.site(IUniversity)
+    grok.name('certcourses_catalog')
+    grok.context(ICertificateCourse)
 
-     course_code = grok.index.Field(attribute='getCourseCode')
+    course_code = grok.index.Field(attribute='getCourseCode')
 
 @grok.subscribe(ICourse, grok.IObjectAddedEvent)
 def handleCourseAdd(obj, event):
-     """Index an added course with the local catalog.
+    """Index an added course with the local catalog.
 
-     Courses are not indexed automatically, as they are not a
-     dictionary subitem of the accompanied site object
-     (`IUniversity`). I.e. one cannot get them by asking for
-     ``app['FACCODE']['DEPTCODE']['COURSECODE']`` but one has to ask for
-     ``app.faculties['FACCODE']['DEPTCODE'].courses['COURSECODE']``.
+    Courses are not indexed automatically, as they are not a
+    dictionary subitem of the accompanied site object
+    (`IUniversity`). I.e. one cannot get them by asking for
+    ``app['FACCODE']['DEPTCODE']['COURSECODE']`` but one has to ask for
+    ``app.faculties['FACCODE']['DEPTCODE'].courses['COURSECODE']``.
 
-     Once, a course is indexed we can leave the further handling to
-     the default component architechture. At least removals will
-     be handled correctly then (and the course unindexed).
-     """
-     try:
-          cat = getUtility(ICatalog, name='courses_catalog')
-     except ComponentLookupError:
-          # catalog not available. This might happen during tests.
-          return
-     intids = getUtility(IIntIds)
-     index = cat['code']
-     index.index_doc(intids.getId(obj), obj)
+    Once, a course is indexed we can leave the further handling to
+    the default component architechture. At least removals will
+    be handled correctly then (and the course unindexed).
+    """
+    try:
+        cat = getUtility(ICatalog, name='courses_catalog')
+    except ComponentLookupError:
+        # catalog not available. This might happen during tests.
+        return
+    intids = getUtility(IIntIds)
+    index = cat['code']
+    index.index_doc(intids.getId(obj), obj)
 
 @grok.subscribe(IDepartment, grok.IObjectRemovedEvent)
 def handleDepartmentRemoval(obj, event):
-     """Clear courses and certificates when a department is killed.
-     """
-     obj.courses.clear()
-     obj.certificates.clear()
-     return
+    """Clear courses and certificates when a department is killed.
+    """
+    obj.courses.clear()
+    obj.certificates.clear()
+    return
 
 class CourseQueryResultItem(QueryResultItem):
-     def __init__(self, context, view):
-          self.context = context
-          self.url = view.url(context)
-          self.title = "COURSE: " + context.title
-          self.description = 'code: %s' % context.code
+    def __init__(self, context, view):
+        self.context = context
+        self.url = view.url(context)
+        self.title = "COURSE: " + context.title
+        self.description = 'code: %s' % context.code
 
 def search(query=None, view=None):
-     if not query:
-          return []
-     cat = getUtility(ICatalog, name='courses_catalog')
-     results = list(cat.searchResults(code=(query, query)))
-          
-     hitlist = []
-     results = Query().searchResults(
-          Eq(('courses_catalog', 'code'), query))
-     for result in results:
-          hitlist.append(CourseQueryResultItem(result, view=view))
+    if not query:
+        return []
+    cat = getUtility(ICatalog, name='courses_catalog')
+    results = list(cat.searchResults(code=(query, query)))
 
-     results = Query().searchResults(
-          Text(('courses_catalog', 'title'), query))
-          
-     for result in results:
-          hitlist.append(CourseQueryResultItem(result, view=view))
+    hitlist = []
+    results = Query().searchResults(
+        Eq(('courses_catalog', 'code'), query))
+    for result in results:
+        hitlist.append(CourseQueryResultItem(result, view=view))
 
-     return hitlist
+    results = Query().searchResults(
+        Text(('courses_catalog', 'title'), query))
+
+    for result in results:
+        hitlist.append(CourseQueryResultItem(result, view=view))
+
+    return hitlist
