From 9671d2bb8c0bd5d068f0afe2d140d7e4ac066bba Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Mon, 2 Feb 2015 15:34:41 +0000 Subject: [PATCH] Make sure to strip any newlines off the name. --- callback_plugins/logdetail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/callback_plugins/logdetail.py b/callback_plugins/logdetail.py index d4f05b4a53..bab951b43e 100644 --- a/callback_plugins/logdetail.py +++ b/callback_plugins/logdetail.py @@ -141,7 +141,7 @@ class LogMech(object): sanitize_host = host.replace(' ', '_').replace('>', '-') fd = open(self.logpath_play + '/' + sanitize_host + '.log', 'a') now = time.strftime(TIME_FORMAT, time.localtime()) - fd.write(MSG_FORMAT % dict(now=now, name=name, count=count, category=category, data=json.dumps(data))) + fd.write(MSG_FORMAT % dict(now=now, name=name.strip(), count=count, category=category, data=json.dumps(data))) fd.close()