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

Naparuba naparuba at gmail.com
Tue Feb 28 22:09:18 UTC 2012


The following commit has been merged in the debian/master branch:
commit a272debe76669b048ffb97b2efb4ae69a22641e0
Author: Naparuba <naparuba at gmail.com>
Date:   Tue Dec 20 14:26:48 2011 +0100

    Enh : some space on comments.

diff --git a/shinken/macroresolver.py b/shinken/macroresolver.py
index a2f6404..45785de 100644
--- a/shinken/macroresolver.py
+++ b/shinken/macroresolver.py
@@ -246,13 +246,13 @@ class MacroResolver(Borg):
     #the service Load of host srv-1
     def get_type_of_macro(self, macros, clss):
         for macro in macros:
-            #ARGN Macros
+            # ARGN Macros
             if re.match('ARG\d', macro):
                 macros[macro]['type'] = 'ARGN'
                 continue
-            #USERN macros
-            #are managed in the Config class, so no
-            #need to look that here
+            # USERN macros
+            # are managed in the Config class, so no
+            # need to look that here
             elif re.match('_HOST\w', macro):
                 macros[macro]['type'] = 'CUSTOM'
                 macros[macro]['class'] = 'HOST'
@@ -260,17 +260,17 @@ class MacroResolver(Borg):
             elif re.match('_SERVICE\w', macro):
                 macros[macro]['type'] = 'CUSTOM'
                 macros[macro]['class'] = 'SERVICE'
-                #value of macro : re.split('_HOST', '_HOSTMAC_ADDRESS')[1]
+                # value of macro : re.split('_HOST', '_HOSTMAC_ADDRESS')[1]
                 continue
             elif re.match('_CONTACT\w', macro):
                 macros[macro]['type'] = 'CUSTOM'
                 macros[macro]['class'] = 'CONTACT'
                 continue
-            #On demand macro
+            # On demand macro
             elif len(macro.split(':')) > 1:
                 macros[macro]['type'] = 'ONDEMAND'
                 continue
-            #OK, classical macro...
+            # OK, classical macro...
             for cls in clss:
                 if macro in cls.macros:
                     macros[macro]['type'] = 'class'
@@ -317,12 +317,12 @@ class MacroResolver(Borg):
                 val = self.get_value_from_element(s, prop)
                 #print "Got val:", val
                 return val
-        #Ok, service was easy, now hard part
+        # Ok, service was easy, now hard part
         else:
             val = ''
             elt_name = elts[1]
-            #Special case : elt_name can be void
-            #so it's the host where it apply
+            # Special case : elt_name can be void
+            # so it's the host where it apply
             if elt_name == '':
                 for elt in data:
                     if elt is not None and elt.__class__ == self.host_class:

-- 
UNNAMED PROJECT



More information about the Pkg-nagios-changes mailing list