Commit 1ccb50ad authored by Michel Pelletier's avatar Michel Pelletier

Fixed attribute error bug

parent e7da680a
......@@ -84,7 +84,7 @@
##############################################################################
"""Simple column indices"""
__version__='$Revision: 1.3 $'[11:-2]
__version__='$Revision: 1.4 $'[11:-2]
from Globals import Persistent
import BTree
......@@ -156,10 +156,13 @@ class UnIndex(Persistent):
unindex = self._unindex
id = self.id
k=getattr(obj, id)
if callable(k):
k = k()
try:
k=getattr(obj, id)
if callable(k):
k = k()
except:
k = MV
if k is None or k == MV:
return
......
......@@ -202,7 +202,7 @@ Notes on a new text index design
space.
"""
__version__='$Revision: 1.4 $'[11:-2]
__version__='$Revision: 1.5 $'[11:-2]
from Globals import Persistent
import BTree, IIBTree, IOBTree
......@@ -287,12 +287,15 @@ class UnTextIndex(Persistent):
id = self.id
k = getattr(obj, id)
if callable(k):
k = str(k())
else:
k = str(k)
try:
k = getattr(obj, id)
if callable(k):
k = str(k())
else:
k = str(k)
except:
return
d = {}
old = d.has_key
last = None
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment