(self, file_name)
return self._ConvertFileProtoToFileDescriptor(file_proto)
Gets a FileDescriptor by file name.

    Args:
      file_name: The path to the file to get a descriptor for.

    Returns:
      A FileDescriptor for the named file.

    Raises:
      KeyError: if the file can not be found in the pool.
Gets a FileDescriptor by file name.
Gets a FileDescriptor by file name .
def FindFileByName(self, file_name):
    """Gets a FileDescriptor by file name.

    Args:
      file_name: The path to the file to get a descriptor for.

    Returns:
      A FileDescriptor for the named file.

    Raises:
      KeyError: if the file can not be found in the pool.
    """

    try:
      return self._file_descriptors[file_name]
    except KeyError:
      pass

    try:
      file_proto = self._internal_db.FindFileByName(file_name)
    except KeyError as error:
      if self._descriptor_db:
        file_proto = self._descriptor_db.FindFileByName(file_name)
      else:
        raise error
    if not file_proto:
      raise KeyError('Cannot find a file named %s' % file_name)
    return self._ConvertFileProtoToFileDescriptor(file_proto)
def FindFileByName ( self , file_name ) : try : return self . _file_descriptors [ file_name ] except KeyError : pass try : file_proto = self . _internal_db . FindFileByName ( file_name ) except KeyError as error : if self . _descriptor_db : file_proto = self . _descriptor_db . FindFileByName ( file_name ) else : raise error if not file_proto : raise KeyError ( 'Cannot find a file named %s' % file_name ) return self . _ConvertFileProtoToFileDescriptor ( file_proto )