[Pkg-nagios-changes] [SCM] UNNAMED PROJECT branch, debian/master, updated. 810edbdd3feedbfe37f4a65bee50b57b2f60fa2a
Sébastien Coavoux
s.coavoux at free.fr
Tue Feb 28 22:07:32 UTC 2012
The following commit has been merged in the debian/master branch:
commit 1282cbdd8a6a5abbc21da2455af15d1005685232
Author: Sébastien Coavoux <s.coavoux at free.fr>
Date: Thu Nov 24 19:29:48 2011 +0100
Fix : $$ are now interpreted as $ in macro solving.
diff --git a/shinken/macroresolver.py b/shinken/macroresolver.py
index f21907e..efffb69 100644
--- a/shinken/macroresolver.py
+++ b/shinken/macroresolver.py
@@ -111,6 +111,7 @@ class MacroResolver(Borg):
macros[elt] = {'val' : '', 'type' : 'unknown'}
#self.cache[s] = macros
+ del(macros[''])
return macros
@@ -218,9 +219,13 @@ class MacroResolver(Borg):
for macro in macros:
c_line = c_line.replace('$'+macro+'$', macros[macro]['val'])
+ c_line = c_line.replace("$$", "DOUBLEDOLLAR")
+
if nb_loop > 32: #too mouch loop, we exit
still_got_macros = False
+ c_line = c_line.replace("DOUBLEDOLLAR", "$")
+
#print "Retuning c_line", c_line.strip()
return c_line.strip()
--
UNNAMED PROJECT
More information about the Pkg-nagios-changes
mailing list