more legible output for scripts/peers

This commit is contained in:
ThomasV 2014-03-04 22:31:12 +01:00
parent fa6e9c18b9
commit b0796daee4
1 changed files with 6 additions and 7 deletions

View File

@ -69,11 +69,10 @@ while reached_servers:
results[i.server] = r.get('result')
reached_servers.remove(i.server)
electrum.print_json(results)
out = analyze(results)
if out:
print "faulty servers:"
electrum.print_json(out)
else:
print "ok"
errors = analyze(results).keys()
for n,v in results.items():
print "%30s"%n, v['block_height'], v['utxo_root'], "error" if n in errors else "ok"