From d00a9f504d3891dabe6c1445e00635c428b36f4c Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Thu, 10 Aug 2006 01:07:47 +0000 Subject: [PATCH] * src/Filters/Rules/_HasNoteSubstrBase.py (apply): Enforce unicode. * src/Filters/Rules/_HasNoteRegexBase.py (apply): Enforce unicode. svn: r7148 --- ChangeLog | 2 ++ src/Filters/Rules/_HasNoteRegexBase.py | 2 +- src/Filters/Rules/_HasNoteSubstrBase.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c5c9a349e..813b0777c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ 2006-08-09 Alex Roitman + * src/Filters/Rules/_HasNoteSubstrBase.py (apply): Enforce unicode. + * src/Filters/Rules/_HasNoteRegexBase.py (apply): Enforce unicode. * src/DataViews/_PlaceView.py: Add filter sidebar. * src/FilterEditor/_ShowResults.py: Support media filters. * src/FilterEditor/_EditRule.py: Support media filters. diff --git a/src/Filters/Rules/_HasNoteRegexBase.py b/src/Filters/Rules/_HasNoteRegexBase.py index 2159d7385..b569e24af 100644 --- a/src/Filters/Rules/_HasNoteRegexBase.py +++ b/src/Filters/Rules/_HasNoteRegexBase.py @@ -56,5 +56,5 @@ class HasNoteRegexBase(Rule): self.match = re.compile('') def apply(self,db,person): - n = person.get_note() + n = unicode(person.get_note()) return self.match.match(n) != None diff --git a/src/Filters/Rules/_HasNoteSubstrBase.py b/src/Filters/Rules/_HasNoteSubstrBase.py index 9123abb32..6a2d42ea5 100644 --- a/src/Filters/Rules/_HasNoteSubstrBase.py +++ b/src/Filters/Rules/_HasNoteSubstrBase.py @@ -46,7 +46,7 @@ class HasNoteSubstrBase(Rule): category = _('General filters') def apply(self,db,person): - n = person.get_note() + n = unicode(person.get_note()) if n: return n.upper().find(self.list[0].upper()) != -1 return False