Reapplied earlier fix so that indent option is used, response is still verified to be JSON.

This commit is contained in:
Chris Church 2013-06-28 21:34:20 -04:00
parent 6deca2294d
commit 98af899b49

View File

@ -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: