Ensure jail names return in alphabetical order in status

Primarily to support testing as order can switch
pull/128/merge^2
Steven Hiscocks 12 years ago
parent 53be2ade86
commit 5d0d362e3f

@ -282,12 +282,9 @@ class Server:
def status(self):
try:
self.__lock.acquire()
jailList = ''
for jail in self.__jails.getAll():
jailList += jail + ', '
length = len(jailList)
if not length == 0:
jailList = jailList[:length-2]
jails = list(self.__jails.getAll())
jails.sort()
jailList = ", ".join(jails)
ret = [("Number of jail", self.__jails.size()),
("Jail list", jailList)]
return ret

Loading…
Cancel
Save