git.ithinksw.org
/
philo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git://github.com/lapilofu/philo
[philo.git]
/
contrib
/
sobol
/
search.py
diff --git
a/contrib/sobol/search.py
b/contrib/sobol/search.py
index
36c2b5d
..
33603f3
100644
(file)
--- a/
contrib/sobol/search.py
+++ b/
contrib/sobol/search.py
@@
-42,8
+42,9
@@
class SearchRegistry(object):
def register(self, search, slug=None):
slug = slug or search.slug
if slug in self._registry:
def register(self, search, slug=None):
slug = slug or search.slug
if slug in self._registry:
- if self._registry[slug] != search:
- raise RegistrationError("A different search is already registered as `%s`")
+ registered = self._registry[slug]
+ if registered.__module__ != search.__module__:
+ raise RegistrationError("A different search is already registered as `%s`" % slug)
else:
self._registry[slug] = search
else:
self._registry[slug] = search
@@
-361,7
+362,7
@@
else:
def parse_response(self, response, limit=None):
strainer = self.strainer
soup = BeautifulSoup(response, parseOnlyThese=strainer)
def parse_response(self, response, limit=None):
strainer = self.strainer
soup = BeautifulSoup(response, parseOnlyThese=strainer)
- return self.parse_results(soup
[:limit]
)
+ return self.parse_results(soup
.findAll(recursive=False, limit=limit)
)
def parse_results(self, results):
"""
def parse_results(self, results):
"""