Skip to content
Snippets Groups Projects
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
end_data_index.

This patch fixes this.
parent 6de025dc
No related branches found
No related tags found
1 merge request!60[execution][messagehandlers] Fix write end_data_index handling in LoopMessageHandler
Pipeline #33725 passed
...@@ -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
else:
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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment