From 6618c1e8b56d5ebf00605bb0c4de0cafda64ad28 Mon Sep 17 00:00:00 2001 From: Michael Heca Date: Tue, 15 Apr 2014 14:50:34 +0200 Subject: [PATCH] module replace - report changed only if contents is changed --- files/replace | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/replace b/files/replace index f4193ae9f30..536ac8cd8fc 100644 --- a/files/replace +++ b/files/replace @@ -139,7 +139,7 @@ def main(): mre = re.compile(params['regexp'], re.MULTILINE) result = re.subn(mre, params['replace'], contents, 0) - if result[1] > 0: + if result[1] > 0 and contents != result[0]: msg = '%s replacements made' % result[1] changed = True else: