summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins/Metadata.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-07-28 17:55:15 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-07-28 17:55:15 +0000
commit011d38cd29880942c7049edd95078c41761c49cb (patch)
treee8b709f785b8d9fdbf1cfac4d67781e5f61b9421 /src/lib/Server/Plugins/Metadata.py
parente338fc5a850a25000e5fffc991f65b60deb9fb2b (diff)
downloadbcfg2-011d38cd29880942c7049edd95078c41761c49cb.tar.gz
bcfg2-011d38cd29880942c7049edd95078c41761c49cb.tar.bz2
bcfg2-011d38cd29880942c7049edd95078c41761c49cb.zip
add pretty printing to new metadata entries
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4828 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins/Metadata.py')
-rw-r--r--src/lib/Server/Plugins/Metadata.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/Server/Plugins/Metadata.py b/src/lib/Server/Plugins/Metadata.py
index d9c9c2a43..345f14b54 100644
--- a/src/lib/Server/Plugins/Metadata.py
+++ b/src/lib/Server/Plugins/Metadata.py
@@ -280,7 +280,8 @@ class Metadata(Bcfg2.Server.Plugin.MetadataPlugin,
fd = datafile.fileno()
while self.locked(fd) == True:
pass
- datafile.write(lxml.etree.tostring(self.clientdata_original.getroot()))
+ datafile.write(lxml.etree.tostring(self.clientdata_original.getroot(),
+ pretty_print='true'))
fcntl.lockf(fd, fcntl.LOCK_UN)
datafile.close()
@@ -302,7 +303,8 @@ class Metadata(Bcfg2.Server.Plugin.MetadataPlugin,
value=self.probedata[client][probe])
for group in self.cgroups[client]:
lxml.etree.SubElement(cx, "Group", name=group)
- data = lxml.etree.tostring(top, encoding='UTF-8', xml_declaration=True)
+ data = lxml.etree.tostring(top, encoding='UTF-8', xml_declaration=True,
+ pretty_print='true')
try:
datafile = open("%s/%s" % (self.data, 'probed.xml'), 'w')
except IOError: