Switched write to writebytes for python3 support

This commit is contained in:
Kevin Larson 2019-06-03 18:22:06 -07:00
parent 59fac510c4
commit 823fda9c97

View file

@ -13,7 +13,7 @@ from core.nodes.ipaddress import MacAddress
def write_xml_file(xml_element, file_path, doctype=None):
xml_data = etree.tostring(xml_element, xml_declaration=True, pretty_print=True, encoding="UTF-8", doctype=doctype)
with open(file_path, "w") as xml_file:
with open(file_path, "wb") as xml_file:
xml_file.write(xml_data)