formatting update

This commit is contained in:
Cort Buffington 2015-06-30 20:49:02 -05:00
parent b77e2a9809
commit 02439f6ec4

View File

@ -27,6 +27,7 @@ def read_dict():
def print_stats():
NETWORK = read_dict()
if NETWORK != "None":
print('NETWORK STATISTICS REPORT')
for ipsc in NETWORK:
stat = NETWORK[ipsc]['MASTER']['STATUS']
print(ipsc)
@ -41,6 +42,7 @@ def print_stats():
stat = NETWORK[ipsc]['PEERS'][peer]['STATUS']
print(' RADIO ID: {} CONNECTED: {}, KEEP ALIVES: SENT {} RECEIVED {} MISSED {}'.format(str(int_id(peer)).rjust(8,'0'),stat['CONNECTED'],stat['KEEP_ALIVES_SENT'],stat['KEEP_ALIVES_RECEIVED'],stat['KEEP_ALIVES_MISSED']))
print()
print()
if __name__ == '__main__':
output_stats = task.LoopingCall(print_stats)