DiffSK / configobj

Python 3+ compatible port of the configobj library

Home Page:https://configobj.readthedocs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: How to set parser to ignore errors?

anoopjb opened this issue · comments

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