parameters: ()
docstring: List wifi keys known to the system.
  
      :return: A generator yielding Key objects
docstring_summary: List wifi keys known to the system.
docstring_tokens: List wifi keys known to the system .
function: def list_keys() -> Generator[Key, None, None]:
      """
      List wifi keys known to the system.
  
      :return: A generator yielding Key objects
      """
      keys_dir = CONFIG["wifi_keys_dir"]
      # TODO(mc, 2018-10-24): add last modified info to keys for sort purposes
      for path in os.listdir(keys_dir):
          full_path = os.path.join(keys_dir, path)
          if os.path.isdir(full_path):
              in_path = os.listdir(full_path)
              if len(in_path) > 1:
                  log.warning("Garbage in key dir for key {}".format(path))
              yield Key(directory=path, file=in_path[0])
          else:
              log.warning("Garbage in wifi keys dir: {}".format(full_path))
function_tokens: def list_keys ( ) -> Generator [ Key , None , None ] : keys_dir = CONFIG [ "wifi_keys_dir" ] # TODO(mc, 2018-10-24): add last modified info to keys for sort purposes for path in os . listdir ( keys_dir ) : full_path = os . path . join ( keys_dir , path ) if os . path . isdir ( full_path ) : in_path = os . listdir ( full_path ) if len ( in_path ) > 1 : log . warning ( "Garbage in key dir for key {}" . format ( path ) ) yield Key ( directory = path , file = in_path [ 0 ] ) else : log . warning ( "Garbage in wifi keys dir: {}" . format ( full_path ) )