From ea54815e6b2cf5a762236875e193f80fd375507e Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Fri, 27 Mar 2020 17:07:48 -0400 Subject: [PATCH] fix a bug that broke `awx config` see: https://github.com/ansible/tower/issues/4206 --- awxkit/awxkit/cli/resource.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/awxkit/awxkit/cli/resource.py b/awxkit/awxkit/cli/resource.py index 152b9a1cbb..a162c36fc8 100644 --- a/awxkit/awxkit/cli/resource.py +++ b/awxkit/awxkit/cli/resource.py @@ -176,8 +176,12 @@ def parse_resource(client, skip_deprecated=False): ] } _filter = 'key, value' + try: + connection = client.root.connection + except AttributeError: + connection = None formatted = format_response( - Page.from_json(response, connection=client.root.connection), + Page.from_json(response, connection=connection), fmt=client.get_config('format'), filter=_filter )