Skip to content

item_dict does not return a stanza if it's empty #36

@ghost

Description

Example:

[stanza_with_something]
key = value

[empty_stanza]

Reproduce:

import addonfactory_splunk_conf_parser_lib as conf_parser

conf = """
[stanza_with_something]
key = value

[empty_stanza]
"""
parser = conf_parser.TABConfigParser()
parser.read_string(conf)
print(parser.item_dict())

Current behaviour:

{'stanza_with_something': {'key': 'value'}}

Potential (?) behaviour:

{'empty_stanza': {}, 'stanza_with_something': {'key': 'value'}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions