diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Server/Plugins/Metadata.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/lib/Server/Plugins/Metadata.py b/src/lib/Server/Plugins/Metadata.py index fb7455a4c..52ae10dff 100644 --- a/src/lib/Server/Plugins/Metadata.py +++ b/src/lib/Server/Plugins/Metadata.py @@ -285,7 +285,7 @@ class Metadata(Bcfg2.Server.Plugin.Plugin, continue else: break - tree.write(client_tree) + tree.write(client_tree, pretty_print=True) fcntl.lockf(fd, fcntl.LOCK_UN) client_tree.close() @@ -307,7 +307,7 @@ class Metadata(Bcfg2.Server.Plugin.Plugin, continue else: break - tree.write(client_tree) + tree.write(client_tree, pretty_print=True) fcntl.lockf(fd, fcntl.LOCK_UN) client_tree.close() @@ -500,14 +500,6 @@ class Metadata(Bcfg2.Server.Plugin.Plugin, raise MetadataRuntimeError # prep data dataroot = self.clientdata_original.getroot() - if hasattr(dataroot, 'iter'): - items = dataroot.iter() - else: - items = dataroot.getchildren() - for item in items: - # no items have text data of any sort - item.tail = None - item.text = None newcontents = lxml.etree.tostring(dataroot, pretty_print=True) fd = datafile.fileno() |