* GenericFilter.py: Don't crash on corrupt database
svn: r4381
This commit is contained in:
parent
b905316bbd
commit
ec549b3d69
@ -1,3 +1,6 @@
|
|||||||
|
2005-04-19 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||||
|
* GenericFilter.py: Don't crash on corrupt database
|
||||||
|
|
||||||
2005-04-19 Eero Tamminen <eerot@sf>
|
2005-04-19 Eero Tamminen <eerot@sf>
|
||||||
* src/GenericFilter.py: Fix typo
|
* src/GenericFilter.py: Fix typo
|
||||||
* src/ReportUtils.py: Fix typos
|
* src/ReportUtils.py: Fix typos
|
||||||
|
@ -1950,7 +1950,7 @@ class HasTextMatchingSubstringOf(Rule):
|
|||||||
event = self.db.get_event_from_handle(event_handle)
|
event = self.db.get_event_from_handle(event_handle)
|
||||||
if self.match_object(event):
|
if self.match_object(event):
|
||||||
match = 1
|
match = 1
|
||||||
else:
|
elif event:
|
||||||
place_handle = event.get_place_handle()
|
place_handle = event.get_place_handle()
|
||||||
if place_handle:
|
if place_handle:
|
||||||
if self.search_place(place_handle):
|
if self.search_place(place_handle):
|
||||||
@ -1985,6 +1985,8 @@ class HasTextMatchingSubstringOf(Rule):
|
|||||||
self.place_map[handle] = 1
|
self.place_map[handle] = 1
|
||||||
|
|
||||||
def match_object(self,obj):
|
def match_object(self,obj):
|
||||||
|
if not obj:
|
||||||
|
return 0
|
||||||
if self.regexp_match:
|
if self.regexp_match:
|
||||||
return obj.matches_regexp(self.list[0],self.case_sensitive)
|
return obj.matches_regexp(self.list[0],self.case_sensitive)
|
||||||
return obj.matches_string(self.list[0],self.case_sensitive)
|
return obj.matches_string(self.list[0],self.case_sensitive)
|
||||||
|
Loading…
Reference in New Issue
Block a user