From 21aad513759f28f037f1847375c04715d84822ff Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Tue, 28 Feb 2017 23:43:04 -0600 Subject: [PATCH] Fix unnecessary extra work. --- copyvios/attribution.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/copyvios/attribution.py b/copyvios/attribution.py index 15f3e36..bef99d4 100644 --- a/copyvios/attribution.py +++ b/copyvios/attribution.py @@ -24,9 +24,9 @@ def get_attribution_info(site, page): if site.name not in ATTRIB_TEMPLATES: return None - templates = ATTRIB_TEMPLATES[site.name] + base = ATTRIB_TEMPLATES[site.name] prefix = site.namespace_id_to_name(NS_TEMPLATE) - templates |= {prefix + ":" + tmpl for tmpl in templates if ":" not in tmpl} + templates = base | {prefix + ":" + tpl for tpl in base if ":" not in tpl} for template in page.parse().ifilter_templates(): if template.name.matches(templates):