Use list-comprehension for reconnect
to make this action more obvious and understandable
This commit is contained in:
parent
6c301c2ed4
commit
812916f179
|
@ -160,9 +160,9 @@ def _parse_details(log_path, ident_map=None, clients=None, online_dc=True):
|
||||||
else:
|
else:
|
||||||
invoker.kick(client)
|
invoker.kick(client)
|
||||||
if online_dc:
|
if online_dc:
|
||||||
for client in clients:
|
def _reconnect(client):
|
||||||
if client.connected:
|
client.disconnect(datetime.utcnow())
|
||||||
client.disconnect(datetime.utcnow())
|
client.connected += 1
|
||||||
client.connected += 1
|
[_reconnect(client) for client in clients if client.connected]
|
||||||
logger.debug('Finished parsing of %s', log_file.name)
|
logger.debug('Finished parsing of %s', log_file.name)
|
||||||
return clients
|
return clients
|
||||||
|
|
Loading…
Reference in New Issue