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

SW-328: StringIO doesn't like bytes anymore

parent 6aeb1f4f
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,7 @@ from lofar.sas.TriggerEmailService.common.config import DEFAULT_TRIGGER_NOTIFICA ...@@ -41,7 +41,7 @@ from lofar.sas.TriggerEmailService.common.config import DEFAULT_TRIGGER_NOTIFICA
from lofar.sas.TriggerEmailService.common.config import DEFAULT_TRIGGER_NOTIFICATION_SUBJECT from lofar.sas.TriggerEmailService.common.config import DEFAULT_TRIGGER_NOTIFICATION_SUBJECT
from lofar.mom.momqueryservice.momqueryrpc import MoMQueryRPC from lofar.mom.momqueryservice.momqueryrpc import MoMQueryRPC
from lxml import etree from lxml import etree
from io import StringIO from io import BytesIO
from re import findall from re import findall
import socket import socket
...@@ -235,7 +235,7 @@ class TriggerNotificationListener(AbstractBusListener): ...@@ -235,7 +235,7 @@ class TriggerNotificationListener(AbstractBusListener):
def _get_observation_start_stop_times(self, trigger_xml): def _get_observation_start_stop_times(self, trigger_xml):
# for now we work with duration to get stop time # for now we work with duration to get stop time
doc = etree.parse(StringIO(trigger_xml.encode('UTF-8'))) doc = etree.parse(BytesIO(trigger_xml.encode('UTF-8')))
start_times = doc.getroot().findall('specification/activity/observation/timeWindowSpecification/startTime') start_times = doc.getroot().findall('specification/activity/observation/timeWindowSpecification/startTime')
......
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