Skip to content

Commit

Permalink
Fix reporting role as not found when remote_data is None (#81829) (#8…
Browse files Browse the repository at this point in the history
…1836)

(cherry picked from commit 7fab552)
  • Loading branch information
s-hertel committed Oct 2, 2023
1 parent 7f0b392 commit b51538f
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 @@ -1229,6 +1229,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 b51538f

Please sign in to comment.