
Traceback (most recent call last):


 "/Users/aaksenov/workspace/salt-bug-hunting/salt-file-replace/tests/unit/modules/file_test.py", line 168, in test_re_str_flags

flags=['MULTILINE', 'ignorecase'])


 "/Users/aaksenov/workspace/salt-bug-hunting/salt-file-replace/salt/modules/file.py", line 2041, in replace

result, nrepl = re.subn(cpattern, repl, r_data, count)


 "/Users/aaksenov/.virtualenvs/salt-test/lib/python3.5/re.py", line 193, in subn

return _compile(pattern, flags).subn(repl, string, count)

TypeError: cannot use a string pattern on a bytes-like object

Traceback (most recent call last):

...


 ".../osutils.py", line 753, in pump_string_file

write(view[offset:offset+segment_size])


 ".../paramiko/file.py", line 375, in write

data = b(data)


 ".../paramiko/py3compat.py", line 47, in b

raise TypeError("Expected unicode or bytes, got %r" % s)
TypeError: Expected unicode or bytes, got <memory at 0x7f0ce4d08510>
