mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 09:32:21 +00:00
Use natural sort on some self service calls
This commit is contained in:
parent
afc78513a1
commit
11cb47c03e
@ -402,7 +402,7 @@ def handle_request(env, start_response):
|
||||
yield node + '\n'
|
||||
else:
|
||||
start_response('200 OK', (('Content-Type', retype),))
|
||||
yield dumper(sorted(nodes))
|
||||
yield dumper(list(util.natural_sort(nodes)))
|
||||
elif env['PATH_INFO'] == '/self/remoteconfigbmc' and reqbody:
|
||||
try:
|
||||
reqbody = yaml.safe_load(reqbody)
|
||||
@ -570,7 +570,7 @@ def get_scriptlist(scriptcat, cfg, nodename, pathtemplate):
|
||||
if not os.path.isdir(target) and os.path.isdir(target + '.d'):
|
||||
target = target + '.d'
|
||||
try:
|
||||
slist = sorted(os.listdir(target))
|
||||
slist = list(util.natural_sort(os.listdir(target))
|
||||
except OSError:
|
||||
pass
|
||||
return slist, profile
|
||||
|
Loading…
Reference in New Issue
Block a user