Commit 9c5b097c authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[execution][messagehandlers] Fix write end_data_index handling in LoopMessageHandler

The None value is not properly handled and ends up
triggering a warning while it is a valid value for

This patch fixes this.
parent 6de025dc
Pipeline #33725 passed with stage
in 14 minutes and 26 seconds
...@@ -416,11 +416,17 @@ class LoopMessageHandler(MessageHandler): ...@@ -416,11 +416,17 @@ class LoopMessageHandler(MessageHandler):
def write(self, end_data_index): def write(self, end_data_index):
""" Trigger a write on the output""" """ Trigger a write on the output"""
try: end_data_index = end_data_index.decode("utf-8")
end_data_index = int(end_data_index)
except ValueError: if end_data_index != "None":
logger.warning("recv: wrt invalid value {}".format(end_data_index)) try:
end_data_index = int(end_data_index)
except ValueError:
logger.warning("recv: wrt invalid value {}".format(end_data_index))
end_data_index = None
end_data_index = None end_data_index = None
logger.debug("recv: wrt {}".format(end_data_index)) logger.debug("recv: wrt {}".format(end_data_index))
try: try:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment