Fix reporting role as not found when remote_data is None (#81829) (#81835)

(cherry picked from commit 7fab552563)
pull/81860/head
Sloane Hertel 2 years ago committed by GitHub
parent 820dae4aff
commit 3f12097a41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- ansible-galaxy info - fix reporting no role found when lookup_role_by_name returns None.

@ -1196,6 +1196,9 @@ class GalaxyCLI(CLI):
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

Loading…
Cancel
Save