diff options
author | Mike McCallister <mike@mccllstr.com> | 2011-07-25 17:23:46 -0500 |
---|---|---|
committer | Mike McCallister <mike@mccllstr.com> | 2011-07-25 17:23:46 -0500 |
commit | 17d801958e683c5ff4a9122f9fd172f0be67f5a5 (patch) | |
tree | d260747484a38fdc8dd0d3c5630aeeb140e00a4b /src | |
parent | 7e06e71fb12413b5179a151a99fcfea94ee004d7 (diff) | |
download | bcfg2-17d801958e683c5ff4a9122f9fd172f0be67f5a5.tar.gz bcfg2-17d801958e683c5ff4a9122f9fd172f0be67f5a5.tar.bz2 bcfg2-17d801958e683c5ff4a9122f9fd172f0be67f5a5.zip |
Update to Deps to eliminate "Failed to add dep entry for <built-in function Comment>:None" warning.
Comments in the Deps file (inside a Package element) will cause the
above error. In generating the prerequisites, we can eliminate this by
looking for callable() items and excluding them.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Server/Plugins/Deps.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/Server/Plugins/Deps.py b/src/lib/Server/Plugins/Deps.py index 3a538292e..482d457af 100644 --- a/src/lib/Server/Plugins/Deps.py +++ b/src/lib/Server/Plugins/Deps.py @@ -122,7 +122,12 @@ class Deps(Bcfg2.Server.Plugin.PrioDir, matching = [matching[index]] elif len(matching) == 1: for prq in matching[0].cache[1][entry[0]][entry[1]]: - if prq not in prereqs and prq not in entries: + # XML comments seem to show up in the cache as a + # tuple with item 0 being callable. The logic + # below filters them out. Would be better to + # exclude them when we load the cache in the first + # place. + if prq not in prereqs and prq not in entries and not callable(prq[0]): toexamine.append(prq) prereqs.append(prq) else: |