From ab4401a4fe6545df4b3c5954e344152e69591cef Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 17 Oct 2009 15:47:19 -0600 Subject: [PATCH] IGN:Pretty print scheduler.xml --- src/calibre/web/feeds/recipes/collection.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/calibre/web/feeds/recipes/collection.py b/src/calibre/web/feeds/recipes/collection.py index 852325f706..b52212d73e 100644 --- a/src/calibre/web/feeds/recipes/collection.py +++ b/src/calibre/web/feeds/recipes/collection.py @@ -193,11 +193,15 @@ class SchedulerConfig(object): def write_scheduler_file(self): from calibre.utils.lock import ExclusiveFile + self.root.text = '\n\n\t' + for x in self.root: + x.tail = '\n\n\t' + self.root[-1].tail = '\n\n' with ExclusiveFile(self.conf_path) as f: f.seek(0) f.truncate() f.write(etree.tostring(self.root, encoding='utf-8', - xml_declaration=True, pretty_print=True)) + xml_declaration=True, pretty_print=False)) def serialize_schedule(self, typ, schedule): s = E.schedule({'type':typ})