Added returned type to python backend and frontend

This commit is contained in:
2023-04-19 10:00:46 +02:00
parent 0946982ab6
commit 8c58c493be
3 changed files with 4 additions and 4 deletions

View File

@@ -54,12 +54,12 @@ def xpath(source: str, xpath: str) -> str:
# root.xpath can return 4 types: float, string, bool and list.
# List is the only one that can't be simply converted to str
if type(result) is not list:
return str(result)
return str(result), type(result).__name__
else:
result_string = ""
for e in result:
result_string += etree.tostring(e, pretty_print=True).decode() + "\n"
return result_string
return result_string, "list"