Skip to content

Commit 06e0242

Browse files
committed
correct sysrc typos to sysctl in JailParams module
1 parent 79ede5e commit 06e0242

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

libioc/JailParams.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class JailParams(collections.abc.MutableMapping):
114114
"""Collection of jail parameters."""
115115

116116
__base_class = JailParam
117-
__sysrc_params: typing.Dict[str, freebsd_sysctl.Sysctl]
117+
__sysctl_params: typing.Dict[str, freebsd_sysctl.Sysctl]
118118

119119
def __iter__(self) -> typing.Iterator[str]:
120120
"""Iterate over the jail param names."""
@@ -133,28 +133,28 @@ def keys(self) -> typing.KeysView[str]:
133133
return collections.abc.KeysView(list(self.__iter__())) # noqa: T484
134134

135135
def __getitem__(self, key: str) -> typing.Any:
136-
"""Set of jail params sysrc is not implemented."""
136+
"""Set of jail params sysctl is not implemented."""
137137
return self.memoized_params.__getitem__(key)
138138

139139
def __setitem__(self, key: str, value: typing.Any) -> None:
140-
"""Set of jail params sysrc is not supportes."""
140+
"""Set of jail params sysctl is not supportes."""
141141
self.memoized_params.__setitem__(key, value)
142142

143143
def __delitem__(self, key: str) -> None:
144-
"""Delete of jail param sysrc not supported."""
144+
"""Delete of jail param sysctl not supported."""
145145
self.memoized_params.__delitem__(key)
146146

147147
@property
148148
def memoized_params(self) -> typing.Dict[str, freebsd_sysctl.Sysctl]:
149149
"""Return the memorized params initialized on first access."""
150150
try:
151-
return self.__sysrc_params
151+
return self.__sysctl_params
152152
except AttributeError:
153153
pass
154-
self.__update_sysrc_jail_params()
155-
return self.__sysrc_params
154+
self.__update_sysctl_jail_params()
155+
return self.__sysctl_params
156156

157-
def __update_sysrc_jail_params(self) -> None:
157+
def __update_sysctl_jail_params(self) -> None:
158158
prefix = "security.jail.param"
159159
jail_params = filter(
160160
lambda x: not any((
@@ -163,19 +163,19 @@ def __update_sysrc_jail_params(self) -> None:
163163
)),
164164
self.__base_class(prefix).children
165165
)
166-
# permanently store the queried sysrc in the singleton class
167-
JailParams.__sysrc_params = dict([(x.name, x,) for x in jail_params])
166+
# permanently store the queried sysctl in the singleton class
167+
JailParams.__sysctl_params = dict([(x.name, x,) for x in jail_params])
168168

169169

170170
class HostJailParams(JailParams):
171-
"""Read-only host jail parameters obtained from sysrc."""
171+
"""Read-only host jail parameters obtained from sysctl."""
172172

173173
__base_class = freebsd_sysctl.Sysctl
174174

175175
def __setitem__(self, key: str, value: typing.Any) -> None:
176-
"""Set of jail params sysrc is not supportes."""
176+
"""Set of jail params sysctl is not supportes."""
177177
raise NotImplementedError("jail param sysctl cannot be modified")
178178

179179
def __delitem__(self, key: str) -> None:
180-
"""Delete of jail param sysrc not supported."""
180+
"""Delete of jail param sysctl not supported."""
181181
raise NotImplementedError("jail param sysctl cannot be deleted")

0 commit comments

Comments
 (0)