Fix of issue 2505. Also fix of string and unicode problems in matching

svn: r11336
This commit is contained in:
Peter Landgren 2008-11-22 15:35:14 +00:00
parent ad6034edfd
commit 475da86de2
2 changed files with 4 additions and 1 deletions

View File

@ -73,6 +73,9 @@ class BaseObject:
# Run through its own items
patern_upper = pattern.upper()
for item in self.get_text_data_list():
# Some items are strings, which will fail in item.upper(), and some items are unicode.
# Convert all items to unicode and the item.upper().find(patern_upper) will work OK.
item = unicode(item)
if not item:
continue
if case_sensitive:

View File

@ -94,7 +94,7 @@ class EventRef(SecondaryObject, PrivacyBase, NoteBase, AttributeBase, RefBase):
@return: Returns the list of all textual attributes of the object.
@rtype: list
"""
return self.__role.string
return [self.__role.string]
def get_text_data_child_list(self):
"""