Skip to content

Commit

Permalink
Fix reporting role as not found when remote_data is None (ansible#81829)
Browse files Browse the repository at this point in the history
(cherry picked from commit 7fab552)
  • Loading branch information
s-hertel committed Oct 2, 2023
1 parent 7ed557c commit 44df367
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
@@ -0,0 +1,2 @@
bugfixes:
- ansible-galaxy info - fix reporting no role found when lookup_role_by_name returns None.
3 changes: 3 additions & 0 deletions lib/ansible/cli/galaxy.py
Expand Up @@ -1235,6 +1235,9 @@ def execute_info(self):

if remote_data:
role_info.update(remote_data)
else:
data = u"- the role %s was not found" % role
break

elif context.CLIARGS['offline'] and not gr._exists:
data = u"- the role %s was not found" % role
Expand Down

0 comments on commit 44df367

Please sign in to comment.