diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-09-11 10:32:30 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-09-11 10:32:30 -0400 |
commit | 71c679e1a0105490bd5845a15de5e8f1a32e2166 (patch) | |
tree | c528e62098b599d7ae74ea53908a045ccf2ffb63 /src/lib/Bcfg2/Server/Plugins/Cfg/CfgCatFilter.py | |
parent | b682d9e3c11f94a9a9dc254a6d53e44f953a74bf (diff) | |
download | bcfg2-71c679e1a0105490bd5845a15de5e8f1a32e2166.tar.gz bcfg2-71c679e1a0105490bd5845a15de5e8f1a32e2166.tar.bz2 bcfg2-71c679e1a0105490bd5845a15de5e8f1a32e2166.zip |
Cfg: documented all Cfg modules, added development docs
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Cfg/CfgCatFilter.py')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Cfg/CfgCatFilter.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgCatFilter.py b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgCatFilter.py index c25cf85f1..a2e86b3db 100644 --- a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgCatFilter.py +++ b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgCatFilter.py @@ -1,11 +1,16 @@ -import logging -import Bcfg2.Server.Plugin -from Bcfg2.Server.Plugins.Cfg import CfgFilter +""" Handle .cat files, which append lines to and remove lines from +plaintext files """ -logger = logging.getLogger(__name__) +from Bcfg2.Server.Plugins.Cfg import CfgFilter class CfgCatFilter(CfgFilter): + """ CfgCatFilter appends lines to and remove lines from plaintext + :ref:`server-plugins-generators-Cfg` files""" + + #: Handle .cat files __extensions__ = ['cat'] + + #: .cat files are deprecated deprecated = True def modify_data(self, entry, metadata, data): @@ -19,3 +24,4 @@ class CfgCatFilter(CfgFilter): if line[1:] in datalines: datalines.remove(line[1:]) return "\n".join(datalines) + "\n" + modify_data.__doc__ = CfgFilter.modify_data.__doc__ |