Modify ↓
Ticket #474 (closed defect: fixed)
Report missing attribute in verify/install
Reported by: | [email protected]… | Owned by: | desai |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | bcfg2-client | Version: | |
Keywords: | Cc: |
Description
May I humbly suggest the following patch:
--- src/lib/Client/Tools/__init__.py 2007-06-02 23:00:41.000000000 +0200 +++ /usr/lib/python2.4/site-packages/Bcfg2/Client/Tools/__init__.py 2007-07-30 14:40:37.000000000 +0200 @@ -158,8 +158,8 @@ return False if [attr for attr in self.__req__[entry.tag] if attr not in entry.attrib]: - self.logger.error("Incomplete information for entry %s:%s; cannot verify" \ - % (entry.tag, entry.get('name'))) + self.logger.error("Incomplete information (attribute %s missing) for entry %s:%s; cannot verify" \ + % (attr, entry.tag, entry.get('name'))) return False return True @@ -173,8 +173,8 @@ if not self.handlesEntry(entry): return False if [attr for attr in self.__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("Incomplete information (attribute %s missing) for entry %s:%s; cannot install" \ + % (attr, entry.tag, entry.get('name'))) return False return True
For me, this patch makes it much easier to spot a missing attribute, for example a missing 'status="on"' in a Service definition.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
There was a debug message that did some of this, but I made it an error, and made it include all entries (as opposed to the last one in the list). This is resolved in [bbcbf52af250e66cc5e5a74a1969ac5fe613ff71] (SVN r3579), or the attached patch. Thanks for the patch.