From 98af899b49e70e116aac09a159d2fb66e80d378f Mon Sep 17 00:00:00 2001 From: Chris Church Date: Fri, 28 Jun 2013 21:34:20 -0400 Subject: [PATCH] Reapplied earlier fix so that indent option is used, response is still verified to be JSON. --- awx/scripts/inventory.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awx/scripts/inventory.py b/awx/scripts/inventory.py index 79dac87725..ae58ba9b85 100755 --- a/awx/scripts/inventory.py +++ b/awx/scripts/inventory.py @@ -81,7 +81,8 @@ class InventoryScript(object): url = urlparse.urljoin(url, url_path) response = requests.get(url, auth=auth) response.raise_for_status() - sys.stdout.write(response.content) + sys.stdout.write(json.dumps(json.loads(response.content), + indent=self.indent) + '\n') def run(self): try: