From 15e39096609101008a186c465e202a283134ee3f Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 29 May 2023 14:51:52 +0200 Subject: [PATCH] fix: regression in CheckScmInSrc rule (#610) --- ansiblelater/rules/CheckScmInSrc.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ansiblelater/rules/CheckScmInSrc.py b/ansiblelater/rules/CheckScmInSrc.py index 210e82c..f0a2f7a 100644 --- a/ansiblelater/rules/CheckScmInSrc.py +++ b/ansiblelater/rules/CheckScmInSrc.py @@ -16,8 +16,10 @@ class CheckScmInSrc(StandardBase): if not errors: for role in roles: - src = role.get("src") - if isinstance(role, AnsibleMapping) and bool(src) and "+" in src: + if ( + isinstance(role, AnsibleMapping) and bool(role.get("src")) + and "+" in role.get("src") + ): errors.append(self.Error(role["__line__"], self.helptext)) return self.Result(candidate.path, errors)