galaxy: fix AttributeError on empty requirements.yml (#66726)
* galaxy: fix AttributeError on empty requirements.yml * add changelog
This commit is contained in:
parent
5c721e8a47
commit
9e8fb5b7f5
2 changed files with 3 additions and 1 deletions
|
@ -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…
Reference in a new issue