don't put parameters starting with `known/` to the ready stream (intermediate options only), makes streams and dumps of configuration shorter and better readable

pull/1889/head
sebres 7 years ago
parent b698a74902
commit e20f6204d3

@ -88,11 +88,11 @@ class ActionReader(DefinitionInitConfigReader):
stream.append(head + ["addaction", self._name]) stream.append(head + ["addaction", self._name])
multi = [] multi = []
for opt, optval in opts.iteritems(): for opt, optval in opts.iteritems():
if opt in self._configOpts: if opt in self._configOpts and not opt.startswith('known/'):
multi.append([opt, optval]) multi.append([opt, optval])
if self._initOpts: if self._initOpts:
for opt, optval in self._initOpts.iteritems(): for opt, optval in self._initOpts.iteritems():
if opt not in self._configOpts: if opt not in self._configOpts and not opt.startswith('known/'):
multi.append([opt, optval]) multi.append([opt, optval])
if len(multi) > 1: if len(multi) > 1:
stream.append(["multi-set", self._jailName, "action", self._name, multi]) stream.append(["multi-set", self._jailName, "action", self._name, multi])

Loading…
Cancel
Save