From dd6c9c4a68b7f3ddd74bc48a0f7135a0c30f4b1b Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 16 Sep 2020 15:06:06 +0200 Subject: [PATCH] fix missing tags issue --- CHANGELOG.md | 9 +-------- ansiblelater/rules/deprecated.py | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06652f9..03f4266 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,2 @@ -- DEPRECATE - - the tag 'skip_ansible_lint' to skip tasks is deprecated - use 'skip_ansible_later' instead -- ENHANCEMENT - - add a non-enforcement rule for deprecated features - if you use a custom standards file you may have to enable `check_deprecate` - BUGFIX - - ANSIBLE0010 - allow `shell` module if `args.executable` is used - as this parameter is no longer support by command module + - fix issue if `tags` is not defined for a task object diff --git a/ansiblelater/rules/deprecated.py b/ansiblelater/rules/deprecated.py index 6d87b75..72fb827 100644 --- a/ansiblelater/rules/deprecated.py +++ b/ansiblelater/rules/deprecated.py @@ -11,7 +11,7 @@ def check_deprecated(candidate, settings): if not errors: for task in tasks: - if "skip_ansible_lint" in task.get("tags"): + if "skip_ansible_lint" in (task.get("tags") or []): errors.append( Error( task["__line__"],