Sort autoholds by request ID

Return the hold request IDs returned from the zookeeper API  as
a sorted list so that they will appear in sorted order in the
zuul CLI output.

Change-Id: I3a3d738ac2bebb8b446cb0710bf9f5452c232372
This commit is contained in:
David Shrewsbury
2019-12-09 15:14:47 -05:00
parent 57aa3a06af
commit 951c405845
+1 -1
View File
@@ -544,7 +544,7 @@ class ZooKeeper(object):
Get the current list of all hold requests.
'''
try:
return self.client.get_children(self.HOLD_REQUEST_ROOT)
return sorted(self.client.get_children(self.HOLD_REQUEST_ROOT))
except kze.NoNodeError:
return []