From 629363eaf66c934526472115fd393f65e03ee6dd Mon Sep 17 00:00:00 2001 From: Dan Sheridan Date: Thu, 3 Jan 2013 11:13:38 +0000 Subject: [PATCH] In file.sed: "after" is not a regular expression --- salt/states/file.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/states/file.py b/salt/states/file.py index 1c21a69a05..315b72e2d7 100644 --- a/salt/states/file.py +++ b/salt/states/file.py @@ -1205,7 +1205,7 @@ def sed(name, before, after, limit='', backup='.bak', options='-r -e', # Look for the pattern before attempting the edit if not __salt__['file.contains_regex'](name, before): # Pattern not found; try to guess why - if __salt__['file.contains_regex'](name, after): + if __salt__['file.contains'](name, after): ret['comment'] = 'Edit already performed' ret['result'] = True return ret @@ -1225,7 +1225,7 @@ def sed(name, before, after, limit='', backup='.bak', options='-r -e', nlines = fp_.readlines() # check the result - ret['result'] = __salt__['file.contains_regex'](name, after) + ret['result'] = __salt__['file.contains'](name, after) if slines != nlines: # Changes happened, add them ret['changes']['diff'] = (