fix: fix error on empty or none string src in rule CheckScmInSrc

This commit is contained in:
Robert Kaussow 2023-05-29 13:01:31 +02:00
parent a77609197f
commit 886c393c91
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
1 changed files with 2 additions and 1 deletions

View File

@ -16,7 +16,8 @@ class CheckScmInSrc(StandardBase):
if not errors:
for role in roles:
if isinstance(role, AnsibleMapping) and "+" in role.get("src"):
src = role.get("src")
if isinstance(role, AnsibleMapping) and bool(src) and "+" in src:
errors.append(self.Error(role["__line__"], self.helptext))
return self.Result(candidate.path, errors)