Skip to content

Commit b4468f3

Browse files
committed
introduce user.* namespace for custom jail config properties
1 parent 66c6d14 commit b4468f3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

iocage/Config/Jail/JailConfig.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ def _key_is_mac_config(self, key: str, explicit: bool=False) -> bool:
8585
return True
8686
return (fragments[0] in self["interfaces"].keys()) is True
8787

88+
def _is_user_property(self, key: str) -> bool:
89+
return key.startswith("user.") is True
90+
8891
def _is_known_property(self, key: str) -> bool:
8992
key_is_default = key in self.host.defaults.config.keys()
9093
key_is_setter = f"_set_{key}" in dict.__dir__(self)
@@ -93,7 +96,8 @@ def _is_known_property(self, key: str) -> bool:
9396
key_is_default,
9497
key_is_setter,
9598
key_is_special,
96-
self._key_is_mac_config(key)
99+
self._key_is_mac_config(key),
100+
self._is_user_property(key)
97101
]) is True
98102

99103
def __setitem__(

0 commit comments

Comments
 (0)