From 0811a9fe5e6b50bf6bc54f5bcc46b013a1e94e42 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Fri, 1 Apr 2005 17:38:29 +0000 Subject: fixup error message (Logical change 1.217) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@911 ce84e21b-d406-0410-9b95-82705330c041 --- src/sbin/bcfg2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/sbin/bcfg2 b/src/sbin/bcfg2 index c60402147..6a37bb7af 100644 --- a/src/sbin/bcfg2 +++ b/src/sbin/bcfg2 @@ -145,10 +145,10 @@ if __name__ == '__main__': client.Install() client.CondPrint('verbose', "--> %s of %s config elements correct"%(client.states.values().count(True), total)) - print "Failing Entries:" - for k, v in client.states.iteritems(): - if not v: - print "%s:%s" % (k.tag, k.attrib['name']) + failed = [key for key, value in client.states.iteritems() if not value] + if failed: + client.CondPrint('verbose', "Failing Entries:") + [client.CondPrint('verbose', "%s:%s" % (key.tag, key.get('name'))) for key in failed] else: client.CondPrint("verbose", "All entries correct") -- cgit v1.2.3-1-g7c22