galaxy: fix AttributeError on empty requirements.yml (#66726)

* galaxy: fix AttributeError on empty requirements.yml

* add changelog
pull/66739/head
René Moser 4 years ago committed by Jordan Borean
parent 5c721e8a47
commit 9e8fb5b7f5

@ -0,0 +1,2 @@
bugfixes:
- galaxy - Fix an AttributeError on ansible-galaxy install with an empty requirements.yml (https://github.com/ansible/ansible/issues/66725).

@ -428,7 +428,7 @@ class GalaxyCLI(CLI):
"Failed to parse the requirements yml at '%s' with the following error:\n%s"
% (to_native(requirements_file), to_native(err)))
if requirements_file is None:
if file_requirements is None:
raise AnsibleError("No requirements found in file '%s'" % to_native(requirements_file))
def parse_role_req(requirement):

Loading…
Cancel
Save