Drop ports from top level of features

This commit is contained in:
Neil Booth 2017-03-22 23:45:44 +09:00
parent 30c91c69e1
commit 9238fe397d
2 changed files with 6 additions and 6 deletions

View File

@ -39,9 +39,7 @@ class Peer(object):
# metadata
'source', 'ip_addr', 'good_ports',
'last_connect', 'last_try', 'try_count')
PORTS = ('ssl_port', 'tcp_port')
FEATURES = PORTS + ('pruning', 'server_version',
'protocol_min', 'protocol_max')
FEATURES = ('pruning', 'server_version', 'protocol_min', 'protocol_max')
# This should be set by the application
DEFAULT_PORTS = {}

View File

@ -513,10 +513,12 @@ class Controller(util.LoggedClass):
'Tries', 'Source', 'IP Address')
for item in data:
features = item['features']
yield fmt.format(item['host'][:30],
hostname = item['host']
host = features['hosts'][hostname]
yield fmt.format(hostname[:30],
item['status'],
features['tcp_port'] or '',
features['ssl_port'] or '',
host['tcp_port'] or '',
host['ssl_port'] or '',
features['server_version'] or 'unknown',
features['protocol_min'],
features['protocol_max'],