Merge pull request #29348 from jtand/file_search_fix

Fixes an file.search on python2.6
This commit is contained in:
Mike Place 2015-12-02 16:26:36 -07:00
commit 760a521603

View file

@ -1434,7 +1434,7 @@ def replace(path,
r_data = mmap.mmap(r_file.fileno(),
0,
access=mmap.ACCESS_READ)
except ValueError:
except (ValueError, mmap.error):
# size of file in /proc is 0, but contains data
r_data = "".join(r_file)
if search_only: