Commit dd076c21 authored by Iustin Pop's avatar Iustin Pop
Browse files

Add safety check on job dependency/TIsLength

If TIsLength is applied to a non-container item, it will fail (type
error) due to invalid application of len(). Since this can happen on
user-supplied data, we add an explicit TList/TTuple check (the TTuple
test is a new one).
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarGuido Trotter <>
parent 4a826364
......@@ -259,6 +259,14 @@ def TList(val):
return isinstance(val, list)
def TTuple(val):
"""Checks if the given value is a tuple.
return isinstance(val, tuple)
def TDict(val):
"""Checks if the given value is a dictionary.
......@@ -554,7 +554,8 @@ def _BuildJobDepCheck(relative):
job_id = ht.TJobId
job_dep = \
ht.TAnd(ht.TOr(ht.TList, ht.TTuple),
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