Serhiy Storchaka added the comment:

The bug only in C implementation.

>>> import _pyio
>>> f = _pyio.open("/dev/full", "wb")
>>> f.write(b"Write to full device")
20
>>> f.close()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/serhiy/py/cpython/Lib/_pyio.py", line 732, in close
    self.flush()
  File "/home/serhiy/py/cpython/Lib/_pyio.py", line 1121, in flush
    self._flush_unlocked()
  File "/home/serhiy/py/cpython/Lib/_pyio.py", line 1128, in _flush_unlocked
    n = self.raw.write(self._write_buf)
OSError: [Errno 28] No space left on device
>>> f.closed
True

----------
components: +Extension Modules

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16597>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to