Commit 2459550b authored by Morten Brekkevold's avatar Morten Brekkevold

sort output the same on every run

parent d3e612de
......@@ -10,6 +10,8 @@ import os
import socket
from collections import defaultdict
import logging
from operator import attrgetter
import requests
import argparse
......@@ -142,7 +144,7 @@ def lookup_addresses(kind_devices):
for name in kind_device.get_alternate_names()}
lookups = lookup_dns(list(names.keys()))
LOG.debug("lookups: %r", lookups)
for kind_device in kind_devices.values():
for kind_device in sorted(kind_devices.values(), key=attrgetter('name')):
for name in kind_device.get_alternate_names():
addrs = lookups.get(name, [])
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment