Skip to content

Commit

Permalink
Catch empty collection lists (#332)
Browse files Browse the repository at this point in the history
A file with just `collections:` in it leads to `{'collections':None}` which makes the loop sad.  Easier to catch it here.

Fixes #4034
  • Loading branch information
lod authored Sep 6, 2023
1 parent 0181df0 commit 1ee6d53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ansible_compat/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ def install_requirements( # noqa: C901
raise AnsibleCommandError(result)

# Run galaxy collection install works on v2 requirements.yml
if "collections" in reqs_yaml:
if "collections" in reqs_yaml and reqs_yaml["collections"] is not None:
cmd = [
"ansible-galaxy",
"collection",
Expand Down

0 comments on commit 1ee6d53

Please sign in to comment.