From 0c06fc1d848f0b891b210778b2a99b7396aa8871 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Fri, 31 Jan 2020 18:51:23 +0100 Subject: Get document type declaration back to a single Signed-off-by: Sebastian Pipping --- metagen/metagenerator.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/metagen/metagenerator.py b/metagen/metagenerator.py index e733997..c0b79d7 100755 --- a/metagen/metagenerator.py +++ b/metagen/metagenerator.py @@ -75,7 +75,13 @@ class MyMetadata: # Re-write indentation to tabulators # (for backwards compatibility and smaller diffs with existing files) reparsed = minidom.parseString(xml_text) - return reparsed.toprettyxml(indent='\t', encoding='UTF-8').decode() + xml_text = reparsed.toprettyxml(indent='\t', encoding='UTF-8').decode() + + # Get doctype back on a single line + # - for compatibility with output produced by metagen <0.7 + # - to make pkgcheck stop from warning about PkgMetadataXmlIndentation + return xml_text.replace('