Commit d9bb1a48 by James Cammarata

Merge pull request #7013 from orgoj/replace-patch-changed

module replace - report changed only if contents is changed
parents 8f9e7e0e a1706e64
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment