Fix of issue 2509.
svn: r11337
This commit is contained in:
@@ -73,6 +73,13 @@ class BaseObject:
|
||||
# Run through its own items
|
||||
patern_upper = pattern.upper()
|
||||
for item in self.get_text_data_list():
|
||||
# Many items kave length=0; skip those. However this might be caused by some
|
||||
# unknown other error.
|
||||
if len(item) == 0:
|
||||
continue
|
||||
# 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:
|
||||
|
Reference in New Issue
Block a user