From 32271a3e086af9ccd6f2827148fe019e53ffbfa2 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Sun, 9 Aug 2009 22:22:06 +0000 Subject: [PATCH] Sort HostAttrs - this isn't important now, but will let us do things like check if the zone file has changed later Signed-off-by: Stephen Gran --- ud-generate | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ud-generate b/ud-generate index 5ba59d4..2319787 100755 --- a/ud-generate +++ b/ud-generate @@ -1083,6 +1083,8 @@ HostAttrs = l.search_s(HostBaseDn, ldap.SCOPE_ONELEVEL, "objectClass=debianSe if HostAttrs == None: raise UDEmptyList, "No Hosts" +HostAttrs.sort(lambda x, y: cmp((GetAttr(x, "hostname")).lower(), (GetAttr(y, "hostname")).lower())) + # Generate global things GlobalDir = GenerateDir + "/" GenDisabledAccounts(GlobalDir + "disabled-accounts") -- 2.20.1