def keyring_parser(path):
    """
    This is a very, very, dumb parser that will look for `[entity]` sections
    and return a list of those sections. It is not possible to parse this with
    ConfigParser even though it is almost the same thing.

    Since this is only used to spit out warnings, it is OK to just be naive
    about the parsing.
    """
    sections = []
    with open(path) as keyring:
        lines = keyring.readlines()
        for line in lines:
            line = line.strip('\n')
            if line.startswith('[') and line.endswith(']'):
                sections.append(line.strip('[]'))
    return sections
This is a very, very, dumb parser that will look for `[entity]` sections
    and return a list of those sections. It is not possible to parse this with
    ConfigParser even though it is almost the same thing.

    Since this is only used to spit out warnings, it is OK to just be naive
    about the parsing.