diff --git a/pandora/item/tasks.py b/pandora/item/tasks.py index 035a19f9c..4f4362bef 100644 --- a/pandora/item/tasks.py +++ b/pandora/item/tasks.py @@ -195,7 +195,8 @@ def update_sitemap(base_url): priority = ET.SubElement(url, "priority") priority.text = '1.0' if t.status == 'featured' else '0.75' + data = '\n' + ET.tostring(urlset) with open(sitemap[:-3], 'wb') as f: - f.write('\n' + ET.tostring(urlset)) + f.write(data) with gzip.open(sitemap, 'wb') as f: - f.write('\n' + ET.tostring(urlset)) + f.write(data)