Skip to content
This repository was archived by the owner on Mar 23, 2019. It is now read-only.

Commit f6f3a4d

Browse files
author
Daniil Trishkin
committed
Fix "AttributeError: 'str' object has no attribute 'get'"
- Add check for type of meta dependency elements Fixes #585
1 parent 9b05a94 commit f6f3a4d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

container/utils/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,10 @@ def get_dependencies_for_role(role_path):
313313
meta_main = yaml.safe_load(open(meta_main_path))
314314
if meta_main:
315315
for dependency in meta_main.get('dependencies', []):
316-
yield dependency.get('role', None)
316+
if isinstance(dependency, dict):
317+
yield dependency.get('role', None)
318+
else:
319+
yield dependency
317320

318321
hash_obj = hashlib.sha256()
319322
# Account for variables passed to the role by including the invocation string

0 commit comments

Comments
 (0)