Skip to content

Commit ee2a895

Browse files
committed
Update to print-peer-list function
Made it prettier
1 parent 478301a commit ee2a895

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Diff for: ipsc.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,9 @@ def print_peer_list(_network):
255255

256256
if _status and not NETWORK[_network]['PEERS']:
257257
print('We are the only peer for: %s' % _network)
258+
print('')
258259
return
259-
260+
260261
print('Peer List for: %s' % _network)
261262
for dictionary in NETWORK[_network]['PEERS']:
262263
if dictionary['RADIO_ID'] == NETWORK[_network]['LOCAL']['RADIO_ID']:
@@ -606,11 +607,10 @@ def validate_auth(self, _key, _data):
606607
if __name__ == '__main__':
607608
networks = {}
608609
for ipsc_network in NETWORK:
609-
if NETWORK[ipsc_network]['LOCAL']['AUTH_ENABLED'] == True:
610-
networks[ipsc_network] = IPSC(ipsc_network)
611-
else:
612-
networks[ipsc_network] = UnauthIPSC(ipsc_network)
613-
614-
if (NETWORK[ipsc_network]['LOCAL']['ENABLED']):
610+
if (NETWORK[ipsc_network]['LOCAL']['ENABLED']):
611+
if NETWORK[ipsc_network]['LOCAL']['AUTH_ENABLED'] == True:
612+
networks[ipsc_network] = IPSC(ipsc_network)
613+
else:
614+
networks[ipsc_network] = UnauthIPSC(ipsc_network)
615615
reactor.listenUDP(NETWORK[ipsc_network]['LOCAL']['PORT'], networks[ipsc_network])
616616
reactor.run()

0 commit comments

Comments
 (0)