Commit 2588b417 by serfrape

Allow to receive messages with lists of lists.

parent 51937a71
......@@ -221,15 +221,14 @@ def parse_literal(msg):
args = msg.split("(")[1]
args = args.split(")")[0]
args = literal_eval(args)
if not isinstance(args, tuple):
args = (args,)
new_args = []
for arg in args:
def recursion(arg):
if isinstance(arg, list):
arg = tuple(arg)
new_args.append(arg)
args = tuple(new_args)
return tuple(recursion(i) for i in arg)
return arg
new_args = (recursion(args),)
else:
args = ''
return functor, args
new_args = ''
return functor, new_args
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