mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
PEP 8 W291 whitespace cleanup.
This commit is contained in:
parent
95789f3949
commit
d913f69ba1
166 changed files with 493 additions and 565 deletions
|
@ -68,20 +68,20 @@ class RoleMetadata(Base):
|
|||
roles = []
|
||||
if ds:
|
||||
if not isinstance(ds, list):
|
||||
raise AnsibleParserError("Expected role dependencies to be a list.", obj=self._ds)
|
||||
raise AnsibleParserError("Expected role dependencies to be a list.", obj=self._ds)
|
||||
|
||||
for role_def in ds:
|
||||
for role_def in ds:
|
||||
if isinstance(role_def, string_types) or 'role' in role_def or 'name' in role_def:
|
||||
roles.append(role_def)
|
||||
roles.append(role_def)
|
||||
continue
|
||||
try:
|
||||
try:
|
||||
# role_def is new style: { src: 'galaxy.role,version,name', other_vars: "here" }
|
||||
def_parsed = RoleRequirement.role_yaml_parse(role_def)
|
||||
if def_parsed.get('name'):
|
||||
role_def['name'] = def_parsed['name']
|
||||
roles.append(role_def)
|
||||
role_def['name'] = def_parsed['name']
|
||||
roles.append(role_def)
|
||||
except AnsibleError as exc:
|
||||
raise AnsibleParserError(str(exc), obj=role_def)
|
||||
raise AnsibleParserError(str(exc), obj=role_def)
|
||||
|
||||
current_role_path = None
|
||||
if self._owner:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue