Clean up debug logging for peer lists
Fixed the peer-list printing function so that it signals there is no peer list if we've not yet received one.
This commit is contained in:
parent
440f3d61b4
commit
7c6899e49f
10
ipsc.py
10
ipsc.py
|
@ -135,10 +135,14 @@ def mode_decode(_network, _mode, _peer):
|
|||
|
||||
# Gratuituous print-out of the peer list.. Pretty much debug stuff.
|
||||
#
|
||||
def print_peer_list(_network_name):
|
||||
def print_peer_list(_network):
|
||||
_log = logger.info
|
||||
_log('\t Peer List for: %s', _network_name)
|
||||
for dictionary in NETWORK[_network_name]['PEERS']:
|
||||
if not NETWORK[_network]['PEERS']:
|
||||
_log('\tNo peer list yet for: %s', _network)
|
||||
return
|
||||
|
||||
_log('\tPeer List for: %s', _network)
|
||||
for dictionary in NETWORK[_network]['PEERS']:
|
||||
_log('\tIP Address: %s:%s', dictionary['IP'], dictionary['PORT'])
|
||||
_log('\tRADIO ID: %s ', int(binascii.b2a_hex(dictionary['RADIO_ID']), 16))
|
||||
_log('\tIPSC Mode:')
|
||||
|
|
Loading…
Reference in New Issue