From 619d8822eecbfe604c6cd008b818bcc42c8ab221 Mon Sep 17 00:00:00 2001 From: Mike Brady Date: Sat, 11 Aug 2007 18:40:25 +0000 Subject: RPMng: Improved debug output when required attributes are not present. git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3624 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Client/Tools/RPMng.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lib/Client/Tools/RPMng.py b/src/lib/Client/Tools/RPMng.py index fae021a81..15f51ab79 100644 --- a/src/lib/Client/Tools/RPMng.py +++ b/src/lib/Client/Tools/RPMng.py @@ -713,7 +713,7 @@ class RPMng(Bcfg2.Client.Tools.PkgTool): if [attr for attr in self.__new_gpg_ireq__[inst.tag] \ if attr not in inst.attrib]: self.logger.error("Incomplete information for entry %s:%s; cannot install"\ - % (inst.tag, inst.get('name'))) + % (inst.tag, entry.get('name'))) return False else: # New format with Instances. @@ -721,14 +721,18 @@ class RPMng(Bcfg2.Client.Tools.PkgTool): if [attr for attr in self.__new_ireq__[entry.tag] if attr not in entry.attrib]: self.logger.error("Incomplete information for entry %s:%s; cannot install" \ % (entry.tag, entry.get('name'))) + self.logger.error(" Required attributes that may not be present are %s" \ + % (self.__new_ireq__[entry.tag])) return False # Check that the Instance Level has what we need for verification. for inst in instances: if inst.tag == 'Instance': if [attr for attr in self.__new_ireq__[inst.tag] \ if attr not in inst.attrib]: - self.logger.error("Incomplete information for entry %s:%s; cannot install" \ - % (inst.tag, inst.get('name'))) + self.logger.error("Incomplete information for %s of package %s; cannot install" \ + % (inst.tag, entry.get('name'))) + self.logger.error(" Required attributes that may not be present are %s" \ + % (self.__new_ireq__[inst.tag])) return False return True -- cgit v1.2.3-1-g7c22