samba-tool ldapcmp: print DNs on predictable order
[amitay/samba.git] / python / samba / netcmd / ldapcmp.py
index 2118c1a780030e37ab6b7046942f3e0b02ee8080..17c62928a55ed6a457b512084465bf0dff5d1daa 100644 (file)
@@ -743,14 +743,14 @@ class LDAPBundle(object):
             if self_only:
                 res = False
                 self.log("\n* DNs found only in %s:" % self.con.host)
-                for x in self_only:
+                for x in sorted(self_only):
                     self.log(4 * " " + x)
 
             other_only = other_dns - self_dns  # missing in self
             if other_only:
                 res = False
                 self.log("\n* DNs found only in %s:" % other.con.host)
-                for x in other_only:
+                for x in sorted(other_only):
                     self.log(4 * " " + x)
 
         common_dns = self_dns & other_dns