Fix of issue 4078, note.get() unicode now.

svn: r15596
This commit is contained in:
Peter Landgren 2010-06-28 07:28:16 +00:00
parent 3e81d9dd88
commit e7edfbdc0a
4 changed files with 4 additions and 4 deletions

View File

@ -57,7 +57,7 @@ class MatchesRegexpOf(Rule):
def apply(self, db, note): def apply(self, db, note):
""" Apply the filter """ """ Apply the filter """
text = unicode(note.get()) text = note.get()
if self.match.match(text) is not None: if self.match.match(text) is not None:
return True return True
return False return False

View File

@ -49,7 +49,7 @@ class MatchesSubstringOf(Rule):
def apply(self, db, note): def apply(self, db, note):
""" Apply the filter """ """ Apply the filter """
text = unicode(note.get()) text = note.get()
if text.upper().find(self.list[0].upper()) != -1: if text.upper().find(self.list[0].upper()) != -1:
return True return True
return False return False

View File

@ -59,7 +59,7 @@ class HasNoteRegexBase(Rule):
notelist = person.get_note_list() notelist = person.get_note_list()
for notehandle in notelist: for notehandle in notelist:
note = db.get_note_from_handle(notehandle) note = db.get_note_from_handle(notehandle)
n = unicode(note.get()) n = note.get()
if self.match.match(n) is not None: if self.match.match(n) is not None:
return True return True
return False return False

View File

@ -50,7 +50,7 @@ class HasNoteSubstrBase(Rule):
notelist = person.get_note_list() notelist = person.get_note_list()
for notehandle in notelist: for notehandle in notelist:
note = db.get_note_from_handle(notehandle) note = db.get_note_from_handle(notehandle)
n = unicode(note.get()) n = note.get()
if n.upper().find(self.list[0].upper()) != -1: if n.upper().find(self.list[0].upper()) != -1:
return True return True
return False return False