Bug with empty xml files is fixed #43

master
Иванов Денис 3 years ago
parent 19f92a0fe4
commit 1a7b9d7d05

@ -44,6 +44,9 @@ class XMLGConfFormat(Format):
self._initialize_parser()
self._join_before = join_before
if not document_text.strip():
document_text = ("<?xml version='1.0' encoding='UTF-8'?>"
"<gconf></gconf>")
if add_header and not ignore_comments:
self.header, document_text = self._get_header_and_document_text(

@ -39,6 +39,10 @@ class XMLXfceFormat(Format):
self._initialize_parser()
self._join_before = join_before
if not document_text.strip():
document_text = ("<?xml version='1.0' encoding='UTF-8'?>"
"<gconf></gconf>")
if add_header and not ignore_comments:
self.header, document_text = self._get_header_and_document_text(
document_text,

Loading…
Cancel
Save