From 527cd49ffd468167e244dea6751698944be6896d Mon Sep 17 00:00:00 2001 Message-Id: <527cd49ffd468167e244dea6751698944be6896d.1717306662.git.mdw@distorted.org.uk> From: Mark Wooding Date: Sat, 2 May 2015 17:05:20 +0100 Subject: [PATCH] peerdb/tripe-newpeers.in: Sort the output so that testing is easier. Organization: Straylight/Edgeware From: Mark Wooding --- peerdb/tripe-newpeers.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/peerdb/tripe-newpeers.in b/peerdb/tripe-newpeers.in index aa9ccfcb..d22aff7f 100644 --- a/peerdb/tripe-newpeers.in +++ b/peerdb/tripe-newpeers.in @@ -303,7 +303,7 @@ def output(conf, cdb): This is where the special `user' and `auto' database entries get set. """ auto = [] - for sec in conf.sections(): + for sec in sorted(conf.sections()): if sec.startswith('@'): continue elif sec.startswith('$'): @@ -316,7 +316,7 @@ def output(conf, cdb): if conf.has_option(sec, 'user'): cdb.add('U%s' % conf.get(sec, 'user'), sec) url = M.URLEncode(laxp = True, semip = True) - for key, value in conf.items(sec): + for key, value in sorted(conf.items(sec), key = lambda (k, v): k): if not key.startswith('@'): url.encode(key, ' '.join(M.split(value)[0])) cdb.add(label, url.result) -- [mdw]