An open source, non-profit web search engine
Convert to list before sampling
Daoud Clarke62cac83cc687
diff --git a/mwmbl/redis_url_queue.py b/mwmbl/redis_url_queue.pyindex ddcf8be..30605fb 100644--- a/mwmbl/redis_url_queue.py+++ b/mwmbl/redis_url_queue.py@@ -106,12 +106,12 @@ class RedisURLQueue:domains = list(CORE_DOMAINS)top_curated_domains = (DOMAINS.keys() & top_scoring_domains) | curated_domainsif len(top_curated_domains) > NUM_TOP_DOMAIN_URLS_TO_INCLUDE:- domains += random.sample(top_curated_domains, NUM_TOP_DOMAIN_URLS_TO_INCLUDE)+ domains += random.sample(list(top_curated_domains), NUM_TOP_DOMAIN_URLS_TO_INCLUDE)else:domains += list(top_curated_domains)if len(top_other_domains) > NUM_OTHER_URLS_TO_INCLUDE:- domains += random.sample(top_other_domains, NUM_OTHER_URLS_TO_INCLUDE)+ domains += random.sample(list(top_other_domains), NUM_OTHER_URLS_TO_INCLUDE)else:domains += list(top_other_domains)