diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-05-14 11:43:14 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-05-14 11:43:35 -0400 |
commit | 34aff9f18f7a8ee59e8e07ceaf89d79bd6e96509 (patch) | |
tree | a60979cded7755adf5324b1f83b074bce392f5bb /src/lib/Bcfg2/Server/Plugins/Pkgmgr.py | |
parent | 069f8ecb338f2c25acc2b80e1ab3be5560b28b77 (diff) | |
download | bcfg2-34aff9f18f7a8ee59e8e07ceaf89d79bd6e96509.tar.gz bcfg2-34aff9f18f7a8ee59e8e07ceaf89d79bd6e96509.tar.bz2 bcfg2-34aff9f18f7a8ee59e8e07ceaf89d79bd6e96509.zip |
doc: added devel docs for bcfg2-lint plugins
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Pkgmgr.py')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Pkgmgr.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Pkgmgr.py b/src/lib/Bcfg2/Server/Plugins/Pkgmgr.py index 7dac907e1..a1dcb575f 100644 --- a/src/lib/Bcfg2/Server/Plugins/Pkgmgr.py +++ b/src/lib/Bcfg2/Server/Plugins/Pkgmgr.py @@ -177,7 +177,10 @@ class Pkgmgr(Bcfg2.Server.Plugin.PrioDir): class PkgmgrLint(Bcfg2.Server.Lint.ServerlessPlugin): - """ find duplicate Pkgmgr entries with the same priority """ + """ Find duplicate :ref:`Pkgmgr + <server-plugins-generators-pkgmgr>` entries with the same + priority. """ + def Run(self): pset = set() for pfile in glob.glob(os.path.join(self.config['repo'], 'Pkgmgr', @@ -202,12 +205,13 @@ class PkgmgrLint(Bcfg2.Server.Lint.ServerlessPlugin): # check if package is already listed with same # priority, type, grp if ptuple in pset: - self.LintError("duplicate-package", - "Duplicate Package %s, priority:%s, type:%s" % - (pkg.get('name'), priority, ptype)) + self.LintError( + "duplicate-package", + "Duplicate Package %s, priority:%s, type:%s" % + (pkg.get('name'), priority, ptype)) else: pset.add(ptuple) - + @classmethod def Errors(cls): - return {"duplicate-packages":"error"} + return {"duplicate-packages": "error"} |