Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 4e9ca47716fae0e2ecc8c8df3b907f4eb753fb5c 1 parent c4a2b9f
@naparuba authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  shinken/macroresolver.py
View
3  shinken/macroresolver.py
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.