Use list-comprehension for reconnect

to make this action more obvious and understandable
This commit is contained in:
Thor77 2016-11-04 20:03:02 +01:00
parent 6c301c2ed4
commit 812916f179
1 changed files with 4 additions and 4 deletions

View File

@ -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