When setting defaults (with the ioc CLI), an error uccurs, as seen in this command output:
$ python3.6 . set vnet=on defaults
Traceback (most recent call last):
File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "./__main__.py", line 49, in <module>
main()
File "./__main__.py", line 43, in main
cli(prog_name="iocage")
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "./ioc_cli/set.py", line 63, in cli
target=host.defaults
File "./ioc_cli/shared/jail.py", line 72, in set_properties
updated_properties |= target.config.set_dict(new_data)
File "./libioc/Config/Jail/BaseConfig.py", line 778, in set_dict
if self.set(key, data[key], **setter_args) is True:
File "./libioc/Config/Jail/BaseConfig.py", line 739, in set
hash_before = str(BaseConfig.__getitem__(self, key)).__hash__()
File "./libioc/Config/Jail/BaseConfig.py", line 618, in __getitem__
return get_method()
File "./libioc/Config/Jail/BaseConfig.py", line 414, in _get_vnet
return libioc.helpers.parse_bool(self.data["vnet"]) is True
File "./libioc/Config/Data.py", line 58, in __getitem__
raise KeyError(f"User property not found: {key}")
KeyError: 'User property not found: vnet'
When setting defaults (with the ioc CLI), an error uccurs, as seen in this command output: