diff options
author | Sol Jerome <sol.jerome@gmail.com> | 2013-07-08 16:29:33 -0500 |
---|---|---|
committer | Sol Jerome <sol.jerome@gmail.com> | 2013-07-08 16:29:33 -0500 |
commit | f24ee0bb658d2102c731960a78478687c22cc517 (patch) | |
tree | d9825dcc873f7adcdf615a96ab8f67881265a595 /src/lib/Bcfg2/Client/Frame.py | |
parent | 8bc0d778d5792e89451bd986831ca4ea10bfa39b (diff) | |
parent | a0f20bdde06ccb7be85f59e1b8fbf57e1c492e64 (diff) | |
download | bcfg2-f24ee0bb658d2102c731960a78478687c22cc517.tar.gz bcfg2-f24ee0bb658d2102c731960a78478687c22cc517.tar.bz2 bcfg2-f24ee0bb658d2102c731960a78478687c22cc517.zip |
Merge branch 'maint'
Conflicts:
src/lib/Bcfg2/settings.py
src/sbin/bcfg2-crypt
Diffstat (limited to 'src/lib/Bcfg2/Client/Frame.py')
-rw-r--r-- | src/lib/Bcfg2/Client/Frame.py | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/lib/Bcfg2/Client/Frame.py b/src/lib/Bcfg2/Client/Frame.py index a668a0870..5a9581e9a 100644 --- a/src/lib/Bcfg2/Client/Frame.py +++ b/src/lib/Bcfg2/Client/Frame.py @@ -221,7 +221,15 @@ class Frame(object): # take care of important entries first if not self.dryrun: - for parent in self.config.findall(".//Path/.."): + parent_map = dict((c, p) + for p in self.config.getiterator() + for c in p) + for cfile in self.config.findall(".//Path"): + if (cfile.get('name') not in self.__important__ or + cfile.get('type') != 'file' or + cfile not in self.whitelist): + continue + parent = parent_map[cfile] if ((parent.tag == "Bundle" and ((self.setup['bundle'] and parent.get("name") not in self.setup['bundle']) or @@ -230,15 +238,9 @@ class Frame(object): (parent.tag == "Independent" and (self.setup['bundle'] or self.setup['skipindep']))): continue - for cfile in parent.findall("./Path"): - if (cfile.get('name') not in self.__important__ or - cfile.get('type') != 'file' or - cfile not in self.whitelist): - continue - tools = [t for t in self.tools - if t.handlesEntry(cfile) and t.canVerify(cfile)] - if not tools: - continue + tools = [t for t in self.tools + if t.handlesEntry(cfile) and t.canVerify(cfile)] + if tools: if (self.setup['interactive'] and not self.promptFilter("Install %s: %s? (y/N):", [cfile])): self.whitelist.remove(cfile) |