Handle empty datadog_monitor message (#3468)

Since message is not required, it may be of type None, which cannot have
a replace() called on it.
This commit is contained in:
Jesse Keating 2016-11-26 02:28:45 -08:00 committed by Matt Clay
parent 7e6fe97f57
commit f6e47e4055

View file

@ -197,7 +197,9 @@ def main():
unmute_monitor(module)
def _fix_template_vars(message):
return message.replace('[[', '{{').replace(']]', '}}')
if message:
return message.replace('[[', '{{').replace(']]', '}}')
return message
def _get_monitor(module):