forked from Mirror/pmbootstrap
config: sanity check via types (MR 2252)
Replace the "sanity_check" code with type checking built into the Config __setattr__ operator. This keeps all the Config related code in one place. Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
7a8deb0f5e
commit
1a01738d50
6 changed files with 39 additions and 43 deletions
|
@ -228,7 +228,6 @@ def config(args: PmbArgs):
|
|||
pmb.config.save(args.config, config)
|
||||
elif args.value is not None:
|
||||
setattr(config, args.name, args.value)
|
||||
pmb.config.sanity_checks(config)
|
||||
logging.info("Config changed: " + args.name + "='" + args.value + "'")
|
||||
pmb.config.save(args.config, config)
|
||||
elif args.name:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue