summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-01-10 02:07:55 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-01-10 02:07:55 +0000
commit23850fbb759c114f3a4d3f43facb82366a7e94fc (patch)
tree5b469fdc5551aa58da5ce624165892e800522071 /src
parent823023867b795b7a86695542aba9224d12370305 (diff)
downloadbcfg2-23850fbb759c114f3a4d3f43facb82366a7e94fc.tar.gz
bcfg2-23850fbb759c114f3a4d3f43facb82366a7e94fc.tar.bz2
bcfg2-23850fbb759c114f3a4d3f43facb82366a7e94fc.zip
Add informational message for entries multiply included in configuration (Resolves Ticket #299)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2639 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Client/Frame.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/Client/Frame.py b/src/lib/Client/Frame.py
index 63770760c..e1ff3b669 100644
--- a/src/lib/Client/Frame.py
+++ b/src/lib/Client/Frame.py
@@ -78,6 +78,16 @@ class Frame:
self.logger.error(["%s:%s:%s" % (entry.tag, entry.get('type'), \
entry.get('name')) for entry in problems])
self.logger.error("")
+ entries = [(entry.tag, entry.get('name')) for struct in config for entry in struct]
+ multi = []
+ for entry in entries[:]:
+ if entries.count(entry) > 1:
+ multi.append(entry)
+ entries.remove(entry)
+ if multi:
+ self.logger.info("The following entries are included multiple times:")
+ self.logger.info(multi)
+
def __getattr__(self, name):
if name in ['extra', 'handled', 'modified', '__important__']: