import logging


def parse_submodules_desc_section(section_items, file_path):
    """Find the path and url for this submodule description"""
    path = None
    url = None
    for item in section_items:
        name = item[0].strip().lower()
        if name == 'path':
            path = item[1].strip()
        elif name == 'url':
            url = item[1].strip()
        elif name == 'branch':
            # We do not care about branch since we have a hash - silently ignore
            pass
        else:
            msg = 'WARNING: Ignoring unknown {} property, in {}'
            msg = msg.format(item[0], file_path) # fool pylint
            logging.warning(msg)

    return path, url