fix: regression in CheckScmInSrc rule

This commit is contained in:
Robert Kaussow 2023-05-29 14:26:21 +02:00
parent adc1801724
commit d4bab3fd44
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
1 changed files with 4 additions and 2 deletions

View File

@ -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)