[Checkins] SVN: zc.relationship/trunk/src/zc/relationship/ recommit J?\195?\188rgen Kartnaller's changes, after 1.0 branch has been made.

Gary Poster gary at zope.com
Tue Feb 6 14:03:41 EST 2007


Log message for revision 72405:
  recommit J?\195?\188rgen Kartnaller's changes, after 1.0 branch has been made.
  

Changed:
  U   zc.relationship/trunk/src/zc/relationship/README.txt
  U   zc.relationship/trunk/src/zc/relationship/index.py

-=-
Modified: zc.relationship/trunk/src/zc/relationship/README.txt
===================================================================
--- zc.relationship/trunk/src/zc/relationship/README.txt	2007-02-06 19:03:16 UTC (rev 72404)
+++ zc.relationship/trunk/src/zc/relationship/README.txt	2007-02-06 19:03:40 UTC (rev 72405)
@@ -504,7 +504,7 @@
 
     >>> res = ix.findRelationshipTokenSet(q({'subjects': people['Fred']}))
     >>> res # doctest: +ELLIPSIS
-    <BTrees._IFBTree.IFTreeSet object at ...>
+    <BTrees.IFBTree.IFTreeSet object at ...>
     >>> [intids.getObject(t) for t in res]
     [<(<Person 'Fred'>,) has the role of (<Role 'Project Manager'>,)>]
 
@@ -519,7 +519,7 @@
 
     >>> res = ix.findValueTokenSet(list(res)[0], 'subjects')
     >>> res # doctest: +ELLIPSIS
-    <BTrees._IFBTree.IFTreeSet object at ...>
+    <BTrees.IFBTree.IFTreeSet object at ...>
     >>> [load(t, ix, {}) for t in res]
     [<Person 'Fred'>]
 
@@ -553,7 +553,7 @@
     ...     q({'reltype': 'has the role of'})})
     ... doctest: +ELLIPSIS
     >>> res # doctest: +ELLIPSIS
-    <BTrees._IFBTree.IFTreeSet object at ...>
+    <BTrees.IFBTree.IFTreeSet object at ...>
     >>> [intids.getObject(t) for t in res]
     [<(<Person 'Fred'>,) has the role of (<Role 'Project Manager'>,)>]
 

Modified: zc.relationship/trunk/src/zc/relationship/index.py
===================================================================
--- zc.relationship/trunk/src/zc/relationship/index.py	2007-02-06 19:03:16 UTC (rev 72404)
+++ zc.relationship/trunk/src/zc/relationship/index.py	2007-02-06 19:03:40 UTC (rev 72405)
@@ -1,4 +1,5 @@
 import re
+import types
 
 import persistent
 import persistent.interfaces
@@ -82,10 +83,13 @@
     res = {'multiunion': None}
     for nm in dir(module):
         if not nm.startswith('_') and not nm.endswith('Iterator'):
+            value = getattr(module, nm)
+            if isinstance(value, types.ModuleType):
+                continue
             if re.match('[A-Z][A-Z]', nm):
-                res[nm[2:]] = getattr(module, nm)
+                res[nm[2:]] = value
             else:
-                res[nm] = getattr(module, nm)
+                res[nm] = value
     return res
 
 class Index(persistent.Persistent, zope.app.container.contained.Contained):



More information about the Checkins mailing list