Skip to content

Commit

Permalink
[stable-2.8] Validate types before asserting lengths (ansible#56882)
Browse files Browse the repository at this point in the history
(cherry picked from commit 9c5b721)

Co-authored-by: Matt Martz <matt@sivel.net>
  • Loading branch information
sivel committed May 23, 2019
1 parent 3115c95 commit a20e733
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/sanity/validate-modules/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,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)]),
),
)

Expand Down

0 comments on commit a20e733

Please sign in to comment.