Skip to content
Browse files

Fix : if custom macro was like _HOST it get stripped.

  • Loading branch information...
1 parent c4a2b9f commit 4e9ca47716fae0e2ecc8c8df3b907f4eb753fb5c @naparuba committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 shinken/
3 shinken/
@@ -208,7 +208,8 @@ def resolve_simple_macros_in_string(self, c_line, data, args=None):
macros[macro]['val'] = self._delete_unwanted_caracters(macros[macro]['val'])
if macros[macro]['type'] == 'CUSTOM':
cls_type = macros[macro]['class']
- macro_name = re.split('_' + cls_type, macro)[1].upper()
+ # Beware : only cut the frst _HOST value, so the macro name can have it on it...
+ macro_name = re.split('_' + cls_type, macro, 1)[1].upper()
# Ok, we've got the macro like MAC_ADDRESS for _HOSTMAC_ADDRESS
# Now we get the element in data that have the type HOST
# and we check if it gots the custom value

0 comments on commit 4e9ca47

Please sign in to comment.
Something went wrong with that request. Please try again.