Re: prettify xml output of modifyrepo

Luke Macken <[email protected]>
Newsgroups gmane.linux.rpm.metadata
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.