Skip to content
Snippets Groups Projects
Commit e7f2a8f3 authored by Auke Klazema's avatar Auke Klazema
Browse files

SW-328: StringIO doesn't like bytes anymore

parent 0888d4fa
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@
import os
from lxml import etree
from io import StringIO
from io import BytesIO
from .config import TELESCOPE_MODEL_TYPE1_XML
import json
......@@ -37,7 +37,7 @@ class TelescopeModelXMLGeneratorType1(object):
def get_xml_tree(self, telescope_model):
template_file_path = os.path.expandvars(TELESCOPE_MODEL_TYPE1_XML)
template = self._read_telescope_model_template(template_file_path)
xmldoc = etree.parse(StringIO(template.encode('UTF-8')))
xmldoc = etree.parse(BytesIO(template.encode('UTF-8')))
if not isinstance(telescope_model, TelescopeModel):
raise TelescopeModelException("No telescope model of type TelescopeModel provided")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment