def _keysFromFilepaths(filepaths, parseKey):
 for fp in filepaths:
  if fp.exists():
   try:
    with fp.open() as f:
     for key in readAuthorizedKeyFile(f, parseKey):
      (yield key)
   except (IOError, OSError) as e:
    log.msg('Unable to read {0}: {1!s}'.format(fp.path, e))

def _keysFromFilepaths ( filepaths , parseKey ) : for fp in filepaths : if fp . exists ( ) : try : with fp . open ( ) as f : for key in readAuthorizedKeyFile ( f , parseKey ) : ( yield key ) except ( IOError , OSError ) as e : log . msg ( 'Unable to read {0}: {1!s}' . format ( fp . path , e ) )
helper function that turns an iterable of filepaths into a generator of keys .