From 2940b9d5bb74952a634ad4279159574b0277519f Mon Sep 17 00:00:00 2001 From: ABond Date: Fri, 9 Feb 2018 21:22:10 -0500 Subject: [PATCH] Removed sort from json dump since response is a mix of strings and integers (#34217) --- contrib/inventory/digital_ocean.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/inventory/digital_ocean.py b/contrib/inventory/digital_ocean.py index 35991ccc978..f6b4c14eb38 100755 --- a/contrib/inventory/digital_ocean.py +++ b/contrib/inventory/digital_ocean.py @@ -313,7 +313,7 @@ class DigitalOceanInventory(object): self.write_to_cache() if self.args.pretty: - print(json.dumps(json_data, sort_keys=True, indent=2)) + print(json.dumps(json_data, indent=2)) else: print(json.dumps(json_data)) @@ -517,7 +517,7 @@ class DigitalOceanInventory(object): def write_to_cache(self): """ Writes data in JSON format to a file """ data = {'data': self.data, 'inventory': self.inventory} - json_data = json.dumps(data, sort_keys=True, indent=2) + json_data = json.dumps(data, indent=2) with open(self.cache_filename, 'w') as cache: cache.write(json_data)