示例#1
0
文件: api.py 项目: beav/pulp
def _load_type_descriptors(path):
    """
    :type path: str
    :rtype: list [TypeDescriptor, ...]
    """
    _logger.debug('Loading type descriptors from: %s' % path)
    descriptors = []
    for file_name in os.listdir(path):
        full_file_name = os.path.join(path, file_name)
        content = loading.read_content(full_file_name)
        descriptor = TypeDescriptor(file_name, content)
        descriptors.append(descriptor)
    return descriptors
示例#2
0
文件: api.py 项目: ryanschneider/pulp
def _load_type_descriptors(path):
    """
    @type path: str
    @rtype: list [L{TypeDescriptor}, ...]
    """
    _LOG.debug('Loading type descriptors from: %s' % path)
    descriptors = []
    for file_name in os.listdir(path):
        full_file_name = os.path.join(path, file_name)
        content = loading.read_content(full_file_name)
        descriptor = TypeDescriptor(file_name, content)
        descriptors.append(descriptor)
    return descriptors
示例#3
0
def _load_type_descriptors(path):
    """
    Load files from indicated path for futher processing.

    NOTE: it is used only for loading node.json

    :type path: str
    :rtype: list [TypeDescriptor, ...]
    """
    _logger.debug('Loading type descriptors from: %s' % path)
    descriptors = []
    for file_name in os.listdir(path):
        full_file_name = os.path.join(path, file_name)
        content = loading.read_content(full_file_name)
        descriptor = TypeDescriptor(file_name, content)
        descriptors.append(descriptor)
    return descriptors
示例#4
0
文件: api.py 项目: BrnoPCmaniak/pulp
def _load_type_descriptors(path):
    """
    Load files from indicated path for futher processing.

    NOTE: it is used only for loading node.json

    :type path: str
    :rtype: list [TypeDescriptor, ...]
    """
    _logger.debug('Loading type descriptors from: %s' % path)
    descriptors = []
    for file_name in os.listdir(path):
        full_file_name = os.path.join(path, file_name)
        content = loading.read_content(full_file_name)
        descriptor = TypeDescriptor(file_name, content)
        descriptors.append(descriptor)
    return descriptors