added over.app.ConfigFile.ignore_unknown

This commit is contained in:
Martinez 2016-05-29 09:27:25 +02:00
parent b4019f31d1
commit 89cbc24cbb
2 changed files with 7 additions and 3 deletions

View file

@ -289,12 +289,13 @@ class ConfigFile:
- missing options are appended to the file
"""
def __init__(self, options, path):
def __init__(self, options, path, ignore_unknown=False):
"""
"""
self.options = options
self.path = path
self.ignore_unknown = ignore_unknown
self.print = text.Output("over.app.ConfigFile")
self.seen_hashes = set()
@ -324,6 +325,9 @@ class ConfigFile:
try:
option = self.options[L]
except KeyError:
if self.ignore_unknown:
continue
else:
raise UnknownOption(L)
args = shlex.split(R)

View file

@ -4,5 +4,5 @@
major = 1 # VERSION_MAJOR_IDENTIFIER
minor = 99 # VERSION_MINOR_IDENTIFIER
# VERSION_LAST_MM 1.99
patch = 6 # VERSION_PATCH_IDENTIFIER
patch = 7 # VERSION_PATCH_IDENTIFIER
str = ".".join(str(v) for v in (major, minor, patch))