python_ping
python_ping copied to clipboard
use python_ping as module does not calculate_packet_average
move print_stats function calculate_packet_average code line 635、636 to the begin of of print_stats function will fix this.
It will only calculate the average if self.stats.packets_received > 0
, otherwise it should be the default value of 0.0
. The only time self.stats.average_time
is used is immediately after self.calculate_packet_average()
at line 636.