Commit 826cee31 authored by Federico G. Schwindt's avatar Federico G. Schwindt Committed by Lasse Karstensen

Don't abort on unknown keywords by default

Just warn unless --strict is used.  This allows to use the same .vcc in
4.0 and 4.1.
parent 05c44d38
......@@ -791,7 +791,15 @@ class FileSection(object):
o = parse_func(self, pobj=vx[1].nam)
vx[1].add_method(o)
else:
raise FormatError("Unknown keyword: %s" % t.str, "")
if opts.strict:
raise FormatError("Unknown keyword: %s" %
t.str, "")
else:
print("WARNING: Unknown keyword: %s:" %
t.str, file=sys.stderr)
o = None
while len(self.tl) > 0:
self.get_token()
assert len(self.tl) == 0
if o is None and len(self.l) > 0:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment