If a for loop argument returns a native Python iterable then expand that iterable

This commit is contained in:
Fabio Manganiello 2019-08-16 19:04:15 +02:00
parent 3c675b296f
commit 5ca8ee594f

View file

@ -186,7 +186,14 @@ class LoopProcedure(Procedure):
self.requests = requests
def execute(self, _async=None, **context):
# noinspection PyBroadException
try:
iterable = eval(self.iterable)
if not hasattr(iterable, '__iter__'):
raise RuntimeError
except:
iterable = Request.expand_value_from_context(self.iterable, **context)
response = Response()
for item in iterable: