From 177499476b1e8c741dcee0ef52954e1624ce228d Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Fri, 7 Aug 2015 15:25:36 -0400 Subject: [PATCH] fixed warning --- lib/ansible/plugins/action/__init__.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/ansible/plugins/action/__init__.py b/lib/ansible/plugins/action/__init__.py index b648f0edae2..729fb07ed18 100644 --- a/lib/ansible/plugins/action/__init__.py +++ b/lib/ansible/plugins/action/__init__.py @@ -273,13 +273,8 @@ class ActionBase: else: return data2.split()[0] except IndexError: - # FIXME: this should probably not print to sys.stderr, but should instead - # fail in a more normal way? - sys.stderr.write("warning: Calculating checksum failed unusually, please report this to the list so it can be fixed\n") - sys.stderr.write("command: %s\n" % cmd) - sys.stderr.write("----\n") - sys.stderr.write("output: %s\n" % data) - sys.stderr.write("----\n") + self._display.warning("Calculating checksum failed unusually, please report this to " + \ + "the list so it can be fixed\ncommand: %s\n----\noutput: %s\n----\n") % (cmd, data) # this will signal that it changed and allow things to keep going return "INVALIDCHECKSUM"