Commit 5f04230ef21f7264675b820231a64f02ed1b62e4

Authored by selurvedu
1 parent 56a871d7

Handle UTF-8 properly in Log Object Data keyword

@@ -66,7 +66,7 @@ def log_object_data(data, file_name="", format="yaml"): @@ -66,7 +66,7 @@ def log_object_data(data, file_name="", format="yaml"):
66 else: 66 else:
67 data = data.toYAML(allow_unicode=True, default_flow_style=False) 67 data = data.toYAML(allow_unicode=True, default_flow_style=False)
68 format = 'yaml' 68 format = 'yaml'
69 - LOGGER.log_message(Message(data, "INFO")) 69 + LOGGER.log_message(Message(data.decode('utf-8'), "INFO"))
70 if file_name: 70 if file_name:
71 output_dir = BuiltIn().get_variable_value("${OUTPUT_DIR}") 71 output_dir = BuiltIn().get_variable_value("${OUTPUT_DIR}")
72 with open(os.path.join(output_dir, file_name + '.' + format), "w") as file_obj: 72 with open(os.path.join(output_dir, file_name + '.' + format), "w") as file_obj:
Please register or login to post a comment