Merge pull request #11051 from cachedout/10951

Don't seek on named pipes.
This commit is contained in:
Thomas S Hatch 2014-03-07 14:16:31 -08:00
commit b37e0b9a89

View File

@ -1396,7 +1396,7 @@ def append(path, *args):
try:
ofile.seek(-1, os.SEEK_END)
except IOError as exc:
if exc.errno == errno.EINVAL:
if exc.errno == errno.EINVAL or exc.errno == errno.ESPIPE:
# Empty file, simply append lines at the beginning of the file
pass
else: