summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py b/test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py
index 921c43e1fb..1ffc57ad04 100644
--- a/test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py
+++ b/test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py
@@ -666,6 +666,8 @@ class ModuleValidator(Validator):
found_try_except_import = True
if isinstance(grandchild, ast.Assign):
for target in grandchild.targets:
+ if not isinstance(target, ast.Name):
+ continue
if target.id.lower().startswith('has_'):
found_has = True
if found_try_except_import and not found_has: