mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 09:32:21 +00:00
Merge pull request #153 from Obihoernchen/json-dump-sort
Use natural sort for lists in json dumps
This commit is contained in:
commit
fe6d44a4bb
@ -2647,7 +2647,7 @@ class ConfigManager(object):
|
||||
dumpdata[confarea][element][attribute]['cryptvalue'] = '!'.join(cryptval)
|
||||
elif isinstance(dumpdata[confarea][element][attribute], set):
|
||||
dumpdata[confarea][element][attribute] = \
|
||||
list(dumpdata[confarea][element][attribute])
|
||||
confluent.util.natural_sort(list(dumpdata[confarea][element][attribute]))
|
||||
return json.dumps(
|
||||
dumpdata, sort_keys=True, indent=4, separators=(',', ': '))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user