def collect_uncollected_logs(host):
 if host.job:
  try:
   logs = host.job.get_client_logs()
   for (hostname, remote_path, local_path) in logs:
    if (hostname == host.hostname):
     logging.info('Retrieving logs from %s:%s into %s', hostname, remote_path, local_path)
     host.get_file((remote_path + '/'), (local_path + '/'))
  except Exception as e:
   logging.warning('Error while trying to collect stranded Autotest client logs: %s', e)

def collect_uncollected_logs ( host ) : if host . job : try : logs = host . job . get_client_logs ( ) for ( hostname , remote_path , local_path ) in logs : if ( hostname == host . hostname ) : logging . info ( 'Retrieving logs from %s:%s into %s' , hostname , remote_path , local_path ) host . get_file ( ( remote_path + '/' ) , ( local_path + '/' ) ) except Exception as e : logging . warning ( 'Error while trying to collect stranded Autotest client logs: %s' , e )
collects any leftover uncollected logs from the client .