##// END OF EJS Templates
elementtree.tostring is always bytes
MinRK -
Show More
@@ -145,7 +145,7 b' class WinHPCJob(Configurable):'
145 """Return the string representation of the job description XML."""
145 """Return the string representation of the job description XML."""
146 root = self.as_element()
146 root = self.as_element()
147 indent(root)
147 indent(root)
148 txt = ET.tostring(root, encoding="utf-8")
148 txt = ET.tostring(root, encoding="utf-8").decode('utf-8')
149 # Now remove the tokens used to order the attributes.
149 # Now remove the tokens used to order the attributes.
150 txt = re.sub(r'_[A-Z]_','',txt)
150 txt = re.sub(r'_[A-Z]_','',txt)
151 txt = '<?xml version="1.0" encoding="utf-8"?>\n' + txt
151 txt = '<?xml version="1.0" encoding="utf-8"?>\n' + txt
General Comments 0
You need to be logged in to leave comments. Login now