Convert pattern to string, fixes saltstack#21051

This commit is contained in:
Loren Gordon 2015-02-25 19:37:56 -05:00 committed by C. R. Oldham
parent f7532697a0
commit f3014b5b33

View file

@ -1183,7 +1183,7 @@ def replace(path,
raise SaltInvocationError('Choose between append or prepend_if_not_found')
flags_num = _get_flags(flags)
cpattern = re.compile(pattern, flags_num)
cpattern = re.compile(str(pattern), flags_num)
if bufsize == 'file':
bufsize = os.path.getsize(path)