Add safety check on job dependency/TIsLength
authorIustin Pop <iustin@google.com>
Mon, 3 Dec 2012 10:59:52 +0000 (11:59 +0100)
committerIustin Pop <iustin@google.com>
Tue, 4 Dec 2012 11:44:44 +0000 (12:44 +0100)
commitdd076c21c214732c209a1b60f2ca994ee6518d91
treee9288d54d0406fe1ac9c84c251405aff69e5655f
parent4a826364997322f14f5ce7d1d7f2897fc64bddaf
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: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
lib/ht.py
lib/opcodes.py