Skip to content

Commit

Permalink
Removed sort from json dump since response is a mix of strings and in…
Browse files Browse the repository at this point in the history
…tegers (ansible#34217)
  • Loading branch information
BondAnthony authored and Akasurde committed Feb 10, 2018
1 parent c119f6e commit 2940b9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/inventory/digital_ocean.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def __init__(self):
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))

Expand Down Expand Up @@ -517,7 +517,7 @@ def load_from_cache(self):
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)
Expand Down

0 comments on commit 2940b9d

Please sign in to comment.