[Pkg-nagios-changes] [SCM] UNNAMED PROJECT branch, debian/master, updated. 810edbdd3feedbfe37f4a65bee50b57b2f60fa2a

Sebastien Coavoux s.coavoux at free.fr
Tue Feb 28 22:05:13 UTC 2012


The following commit has been merged in the debian/master branch:
commit d13d25cdeb2b1e72415c9a6d7305f6f2d62bf51c
Author: Sebastien Coavoux <s.coavoux at free.fr>
Date:   Tue Sep 27 10:40:14 2011 +0200

    Fix : indent

diff --git a/shinken/modules/ndodb_mysql_broker/ndodb_mysql_broker.py b/shinken/modules/ndodb_mysql_broker/ndodb_mysql_broker.py
index 38b52a3..4fa96ee 100644
--- a/shinken/modules/ndodb_mysql_broker/ndodb_mysql_broker.py
+++ b/shinken/modules/ndodb_mysql_broker/ndodb_mysql_broker.py
@@ -124,27 +124,30 @@ class Ndodb_Mysql_broker(BaseModule):
 
 
     def get_instance_id(self):
-	query = u"SELECT  max(instance_id) as ID from nagios_instances"
-	self.db.execute_query(query)
-	row = self.db.fetchone()
+        query = u"SELECT  max(instance_id) as ID from nagios_instances"
+        self.db.execute_query(query)
+        row = self.db.fetchone()
 
         if len(row)<1:
             return -1
+        
         #We are the first process writing in base      
-	if row is None:
+        if row is None:
             return 1
+        
         else:
-	    return row[0]+1
+	        return row[0]+1
 
 
 
     def convert_id(self,id):
-	#Look if we have already encountered this id
-	if id in self.database_id_cache	:
-	    return self.database_id_cache[id]
-	else :
-	    data_id = self.get_instance_id()
-	    self.database_id_cache[id]=data_id
+    
+        #Look if we have already encountered this id
+        if id in self.database_id_cache	:
+            return self.database_id_cache[id]
+        else :
+            data_id = self.get_instance_id()
+            self.database_id_cache[id]=data_id
             return data_id
 
 

-- 
UNNAMED PROJECT



More information about the Pkg-nagios-changes mailing list