diff --git a/src/Tools/fcinfo b/src/Tools/fcinfo index 4ce5f34036..07064d4c68 100755 --- a/src/Tools/fcinfo +++ b/src/Tools/fcinfo @@ -235,11 +235,11 @@ if __name__ == '__main__': doc = zfile.read("Document.xml") if gui and "GuiDocument.xml" in zfile.namelist(): guidoc = zfile.read("GuiDocument.xml") - guidoc = re.sub(r"<\?xml.*?-->"," ",guidoc,flags=re.MULTILINE|re.DOTALL) + guidoc = re.sub(b"<\?xml.*?-->",b" ",guidoc,flags=re.MULTILINE|re.DOTALL) # a valid xml doc can have only one root element. So we need to insert # all the contents of the GUiDocument tag into the main one - doc = re.sub(r"<\/Document>","",doc,flags=re.MULTILINE|re.DOTALL) - guidoc = re.sub(r""," ",guidoc,flags=re.MULTILINE|re.DOTALL) + doc = re.sub(b"<\/Document>",b"",doc,flags=re.MULTILINE|re.DOTALL) + guidoc = re.sub(b"",b" ",guidoc,flags=re.MULTILINE|re.DOTALL) doc += guidoc s = os.path.getsize(sys.argv[-1]) if s < 1024: