diff options
author | Sol Jerome <solj@ices.utexas.edu> | 2009-10-07 14:46:08 +0000 |
---|---|---|
committer | Sol Jerome <solj@ices.utexas.edu> | 2009-10-07 14:46:08 +0000 |
commit | eac52c270b8b3b10e461bc46502b64c5f898bd7d (patch) | |
tree | 96da2e78af41305b445de23596b75bf754eedbbc /src/lib/Server/Plugins/Deps.py | |
parent | e686d3b69600441e943c2913542e5477af528d87 (diff) | |
download | bcfg2-eac52c270b8b3b10e461bc46502b64c5f898bd7d.tar.gz bcfg2-eac52c270b8b3b10e461bc46502b64c5f898bd7d.tar.bz2 bcfg2-eac52c270b8b3b10e461bc46502b64c5f898bd7d.zip |
Pylint/PEP 8 Code cleanups
Signed-off-by: Sol Jerome <solj@ices.utexas.edu>
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5477 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins/Deps.py')
-rw-r--r-- | src/lib/Server/Plugins/Deps.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/Server/Plugins/Deps.py b/src/lib/Server/Plugins/Deps.py index b6359a476..cdf23833b 100644 --- a/src/lib/Server/Plugins/Deps.py +++ b/src/lib/Server/Plugins/Deps.py @@ -1,13 +1,15 @@ '''This plugin provides automatic dependency handling''' __revision__ = '$Revision$' -import Bcfg2.Server.Plugin, lxml.etree +import lxml.etree + +import Bcfg2.Server.Plugin class DNode(Bcfg2.Server.Plugin.INode): '''DNode provides supports for single predicate types for dependencies''' raw = {'Group':"lambda x:'%s' in x.groups and predicate(x)"} containers = ['Group'] - + def __init__(self, data, idict, parent=None): self.data = data self.contents = {} @@ -49,7 +51,7 @@ class Deps(Bcfg2.Server.Plugin.PrioDir, def HandleEvent(self, event): self.cache = {} Bcfg2.Server.Plugin.PrioDir.HandleEvent(self, event) - + def validate_structures(self, metadata, structures): entries = [] prereqs = [] @@ -67,7 +69,7 @@ class Deps(Bcfg2.Server.Plugin.PrioDir, prereqs = self.cache[(entries, gdata)] else: [src.Cache(metadata) for src in self.entries.values()] - + toexamine = list(entries[:]) while toexamine: entry = toexamine.pop() @@ -91,7 +93,7 @@ class Deps(Bcfg2.Server.Plugin.PrioDir, toexamine.append(prq) prereqs.append(prq) self.cache[(entries, gdata)] = prereqs - + newstruct = lxml.etree.Element("Independent") for tag, name in prereqs: try: |