From 88c1389251f3adba53e87b114ed20091a6f54f4d Mon Sep 17 00:00:00 2001 From: Peter Landgren Date: Mon, 28 Jun 2010 07:44:17 +0000 Subject: [PATCH] Fix of issue 4078, note.get() unicode now. svn: r15598 --- src/Filters/Rules/Note/_MatchesRegexpOf.py | 2 +- src/Filters/Rules/Note/_MatchesSubstringOf.py | 2 +- src/Filters/Rules/_HasNoteRegexBase.py | 2 +- src/Filters/Rules/_HasNoteSubstrBase.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Filters/Rules/Note/_MatchesRegexpOf.py b/src/Filters/Rules/Note/_MatchesRegexpOf.py index 4fbf2ce1f..061131986 100644 --- a/src/Filters/Rules/Note/_MatchesRegexpOf.py +++ b/src/Filters/Rules/Note/_MatchesRegexpOf.py @@ -57,7 +57,7 @@ class MatchesRegexpOf(Rule): def apply(self, db, note): """ Apply the filter """ - text = unicode(note.get()) + text = note.get() if self.match.match(text) is not None: return True return False diff --git a/src/Filters/Rules/Note/_MatchesSubstringOf.py b/src/Filters/Rules/Note/_MatchesSubstringOf.py index 5ae6f25e7..a6d61d22e 100644 --- a/src/Filters/Rules/Note/_MatchesSubstringOf.py +++ b/src/Filters/Rules/Note/_MatchesSubstringOf.py @@ -49,7 +49,7 @@ class MatchesSubstringOf(Rule): def apply(self, db, note): """ Apply the filter """ - text = unicode(note.get()) + text = note.get() if text.upper().find(self.list[0].upper()) != -1: return True return False diff --git a/src/Filters/Rules/_HasNoteRegexBase.py b/src/Filters/Rules/_HasNoteRegexBase.py index 9e5fa958f..3f19b05df 100644 --- a/src/Filters/Rules/_HasNoteRegexBase.py +++ b/src/Filters/Rules/_HasNoteRegexBase.py @@ -59,7 +59,7 @@ class HasNoteRegexBase(Rule): notelist = person.get_note_list() for notehandle in notelist: note = db.get_note_from_handle(notehandle) - n = unicode(note.get()) + n = note.get() if self.match.match(n) is not None: return True return False diff --git a/src/Filters/Rules/_HasNoteSubstrBase.py b/src/Filters/Rules/_HasNoteSubstrBase.py index 8fd890dc8..603d17e65 100644 --- a/src/Filters/Rules/_HasNoteSubstrBase.py +++ b/src/Filters/Rules/_HasNoteSubstrBase.py @@ -50,7 +50,7 @@ class HasNoteSubstrBase(Rule): notelist = person.get_note_list() for notehandle in notelist: note = db.get_note_from_handle(notehandle) - n = unicode(note.get()) + n = note.get() if n.upper().find(self.list[0].upper()) != -1: return True return False