Modify

Ticket #474 (closed defect: fixed)

Opened 16 years ago

Last modified 9 years ago

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

comment:1 Changed 16 years ago by desai

  • Status changed from new to closed
  • Resolution set to fixed

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.

comment:2 Changed 9 years ago by Ramirotob

  • Milestone Bcfg2 0.9.5 Release deleted

test, test, simply test ) vpdgz6xv

comment:3 Changed 9 years ago by Richardheef

this is test post http://yahoo.com

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.