conf: handle invalid syntax in rust2rpm.toml more gracefully
This commit is contained in:
parent
1604e7e36f
commit
5a8bb9eee9
1 changed files with 5 additions and 0 deletions
|
@ -530,6 +530,11 @@ def load_config(features: set[str], target: str) -> TomlConf:
|
||||||
except FileNotFoundError as exc:
|
except FileNotFoundError as exc:
|
||||||
tomlconf = None
|
tomlconf = None
|
||||||
|
|
||||||
|
except tomllib.TOMLDecodeError as exc:
|
||||||
|
log.error("Cannot read rust2rpm.toml file (TOML syntax error):")
|
||||||
|
log.error(str(exc))
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
except jsonschema.ValidationError as exc:
|
except jsonschema.ValidationError as exc:
|
||||||
if not exc.path:
|
if not exc.path:
|
||||||
log.error("Invalid rust2rpm.toml file (unknown setting or table):")
|
log.error("Invalid rust2rpm.toml file (unknown setting or table):")
|
||||||
|
|
Loading…
Reference in a new issue