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

* galaxy: fix AttributeError on empty requirements.yml

* add changelog

(cherry picked from commit 9e8fb5b7f5)
pull/67297/head
René Moser 5 years ago committed by GitHub
parent f8c4a38ffe
commit 77985f2beb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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).

@ -423,7 +423,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