Skip to content

Question: How to set parser to ignore errors? #164

@anoopjb

Description

@anoopjb

I am trying to edit snmptt.ini configuration file. This configuration file seems to be generated from a perl script. It also has lots of useful comments in the configuration file.

The built-in configparser works with strict option set to false.

import configparser
config = configparser.ConfigParser(allow_no_value=True, strict=False, interpolation=None)
config.read('/etc/snmp/snmptt.ini')

Is there any option in configobj to ignore errors in config file?
I am using configobj (5.0.6) on Python 3.5.2
snmptt.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions