chiark
/
gitweb
/
~mdw
/
tripe
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6b5b24f
)
peerdb/tripe-newpeers.in: Sort the output so that testing is easier.
author
Mark Wooding
<mdw@distorted.org.uk>
Sat, 2 May 2015 16:05:20 +0000
(17:05 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Fri, 8 May 2015 18:26:46 +0000
(19:26 +0100)
peerdb/tripe-newpeers.in
patch
|
blob
|
blame
|
history
diff --git
a/peerdb/tripe-newpeers.in
b/peerdb/tripe-newpeers.in
index aa9ccfcb5e4c91768250289e27adc246476f6f9f..d22aff7f94adbd96c9b1948a87fba64b95dc4b89 100644
(file)
--- 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 = []
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('$'):
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)
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)
if not key.startswith('@'):
url.encode(key, ' '.join(M.split(value)[0]))
cdb.add(label, url.result)