* src/Filters/Rules/Repository/_HasRepo.py: Correct logic.
svn: r7737
This commit is contained in:
parent
e96bbdb75e
commit
e386161912
@ -1,4 +1,5 @@
|
|||||||
2006-11-30 Alex Roitman <shura@gramps-project.org>
|
2006-11-30 Alex Roitman <shura@gramps-project.org>
|
||||||
|
* src/Filters/Rules/Repository/_HasRepo.py: Correct logic.
|
||||||
* src/Filters/Rules/Makefile.am: Ship new file.
|
* src/Filters/Rules/Makefile.am: Ship new file.
|
||||||
* src/Filters/Rules/Family/Makefile.am: Ship new file.
|
* src/Filters/Rules/Family/Makefile.am: Ship new file.
|
||||||
* src/Filters/Rules/Person/Makefile.am: Ship new file.
|
* src/Filters/Rules/Person/Makefile.am: Ship new file.
|
||||||
|
@ -63,21 +63,26 @@ class HasRepo(Rule):
|
|||||||
if repo.type != specified_type:
|
if repo.type != specified_type:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
addr_match = False
|
if self.list[2]:
|
||||||
for addr in repo.address_list:
|
addr_match = False
|
||||||
addr_text = addr.city + addr.state + addr.country + addr.postal \
|
for addr in repo.address_list:
|
||||||
+ addr.phone + addr.street
|
addr_text = addr.city + addr.state + addr.country \
|
||||||
|
+ addr.postal + addr.phone + addr.street
|
||||||
|
|
||||||
if not self.match_substring(2,addr_text):
|
if self.match_substring(2,addr_text):
|
||||||
continue
|
addr_match = True
|
||||||
|
break
|
||||||
|
if not addr_match:
|
||||||
|
return False
|
||||||
|
|
||||||
addr_match = True
|
if self.list[3]:
|
||||||
|
url_match = False
|
||||||
|
for url in repo.urls:
|
||||||
|
url_text = url.path + url.desc
|
||||||
|
if self.match_substring(3,url_text):
|
||||||
|
url_match = True
|
||||||
|
break
|
||||||
|
if not url_match:
|
||||||
|
return False
|
||||||
|
|
||||||
url_match = False
|
return True
|
||||||
for url in repo.urls:
|
|
||||||
url_text = url.path + url.desc
|
|
||||||
if not self.match_substring(3,url_text):
|
|
||||||
continue
|
|
||||||
url_match = True
|
|
||||||
|
|
||||||
return (addr_match or url_match)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user