[Rpm-metadata] prettify xml output of modifyrepo

Luke Macken lmacken at redhat.com
Thu Dec 20 19:18:58 UTC 2007


On Wed, Dec 05, 2007 at 06:22:49PM +0100, Christoph Thiel wrote:
> Hi folks,
> 
> please commit the attached modifyrepo-prettyxml.patch

Hi Christoph,

Wouldn't something like this also suffice?

luke

--- a/modifyrepo.py
+++ b/modifyrepo.py
@@ -108,7 +108,7 @@ class RepoMetadata:
 
         ## Write the updated repomd.xml
         outmd = file(self.repomdxml, 'w')
-        self.doc.writexml(outmd)
+        outmd.write(self.doc.toprettyxml())
         outmd.close()
         print "Wrote:", self.repomdxml
 




More information about the Rpm-metadata mailing list