summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Martz <matt@sivel.net>2019-05-23 16:51:28 -0500
committerToshio Kuratomi <a.badger@gmail.com>2019-05-24 09:11:52 -0700
commit634690ede5ec1aff9550d08100110633d8666536 (patch)
treebf0e3a7cad73f80c0c6e9c330bc0dedf4652cb02
parent4c40e8885115602ab7830e84380ef5cb33a0414a (diff)
downloadansible-634690ede5ec1aff9550d08100110633d8666536.tar.gz
[stable-2.7] Validate types before asserting lengths (#56882)
(cherry picked from commit 9c5b721) Co-authored-by: Matt Martz <matt@sivel.net>
-rw-r--r--test/sanity/validate-modules/schema.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/sanity/validate-modules/schema.py b/test/sanity/validate-modules/schema.py
index 5604e2f42b..ec0a61ee4a 100644
--- a/test/sanity/validate-modules/schema.py
+++ b/test/sanity/validate-modules/schema.py
@@ -13,13 +13,13 @@ def sequence_of_sequences(min=None, max=None):
return All(
Any(
None,
- [Length(min=min, max=max)],
- tuple([Length(min=min, max=max)]),
+ [Any(list, tuple)],
+ tuple([Any(list, tuple)]),
),
Any(
None,
- [Any(list, tuple)],
- tuple([Any(list, tuple)]),
+ [Length(min=min, max=max)],
+ tuple([Length(min=min, max=max)]),
),
)