Fix systemd_nspawn_user_args override

This commit is contained in:
Jip-Hop 2024-07-09 13:41:16 +02:00
parent b8ce9c4fa2
commit d0a532f0dc
1 changed files with 2 additions and 1 deletions

View File

@ -1318,7 +1318,8 @@ def create_jail(**kwargs):
value = kwargs.pop(option) value = kwargs.pop(option)
if ( if (
value is not None value is not None
and len(str(value)) # String, non-empty list of args or int
and (len(value) or isinstance(value, int))
and value is not config.my_get(option, None) and value is not config.my_get(option, None)
): ):
# TODO: this will wipe all systemd_nspawn_user_args from the template... # TODO: this will wipe all systemd_nspawn_user_args from the template...