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

Commit

Permalink
Fix "AttributeError: 'str' object has no attribute 'get'"
Browse files Browse the repository at this point in the history
  - Add check for type of meta dependency elements

Fixes #585
  • Loading branch information
Daniil Trishkin committed Apr 11, 2018
1 parent 9b05a94 commit f6f3a4d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion container/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,10 @@ def get_dependencies_for_role(role_path):
meta_main = yaml.safe_load(open(meta_main_path))
if meta_main:
for dependency in meta_main.get('dependencies', []):
yield dependency.get('role', None)
if isinstance(dependency, dict):
yield dependency.get('role', None)
else:
yield dependency

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

0 comments on commit f6f3a4d

Please sign in to comment.