config: Report unknown options as warnings
Given the way config files can include other files, it is entirely
possible to use the same config file for both Pungi and Distill. Pungi
will however complain about unknown options.
This patch reverts part of c38bb480 and moves deprecation handling back
into schema validation. The validation method then returns a list of
errors and a list of warnings.
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
ec6206b064
commit
c338219ef0
8 changed files with 121 additions and 121 deletions
|
|
@ -64,8 +64,7 @@ def run(config, topdir, has_old):
|
|||
conf = kobo.conf.PyConfigParser()
|
||||
conf.load_from_file(config)
|
||||
|
||||
errors = pungi.checks.validate(conf)
|
||||
warnings = list(pungi.checks.report_removed(conf))
|
||||
errors, warnings = pungi.checks.validate(conf)
|
||||
if errors or warnings:
|
||||
for error in errors + warnings:
|
||||
print(error)
|
||||
|
|
|
|||
|
|
@ -200,8 +200,8 @@ def main():
|
|||
if not pungi.checks.check(conf):
|
||||
sys.exit(1)
|
||||
pungi.checks.check_umask(logger)
|
||||
errors = pungi.checks.validate(conf)
|
||||
for warning in pungi.checks.report_removed(conf):
|
||||
errors, warnings = pungi.checks.validate(conf)
|
||||
for warning in warnings:
|
||||
print >>sys.stderr, warning
|
||||
if errors:
|
||||
for error in errors:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue