def ping(self, sock, data, threaded=False): if threaded: ping_th = PingThread(data) self.pings[sock] = ping_th ping_th.run() else: ping_para = dict() for k, v in data.iteritems(): ping_para[k] = v[0] verbose_ping(**ping_para)
def run(self): # verbose_ping(**self.para) ping_para = dict() for k, v in self.para.iteritems(): ping_para[k] = v[0] verbose_ping(**ping_para)