Author serhiy.storchaka
Recipients jwilk, martin.panter, pitrou, serhiy.storchaka
Date 2015-03-22.07:59:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1427011172.56.0.544745262081.issue22350@psf.upfronthosting.co.za>
In-reply-to
Content
But the same issue exists with regular files.

>>> with open('/dev/full', 'wb') as f:
...     f.write(b'x'*10000)
... 
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
OSError: [Errno 28] No space left on device

And using Python implementation for detailed traceback:

>>> import _pyio
>>> with _pyio.open('/dev/full', 'wb') as f:
...     f.write(b'x'*10000)
... 
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "/home/serhiy/py/cpython/Lib/_pyio.py", line 1184, in write
    self._flush_unlocked()
  File "/home/serhiy/py/cpython/Lib/_pyio.py", line 1211, in _flush_unlocked
    n = self.raw.write(self._write_buf)
OSError: [Errno 28] No space left on device

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "/home/serhiy/py/cpython/Lib/_pyio.py", line 451, in __exit__
    self.close()
  File "/home/serhiy/py/cpython/Lib/_pyio.py", line 767, in close
    self.flush()
  File "/home/serhiy/py/cpython/Lib/_pyio.py", line 1204, in flush
    self._flush_unlocked()
  File "/home/serhiy/py/cpython/Lib/_pyio.py", line 1211, in _flush_unlocked
    n = self.raw.write(self._write_buf)
OSError: [Errno 28] No space left on device


What behavior you expect?
History
Date User Action Args
2015-03-22 07:59:32serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, jwilk, martin.panter
2015-03-22 07:59:32serhiy.storchakasetmessageid: <1427011172.56.0.544745262081.issue22350@psf.upfronthosting.co.za>
2015-03-22 07:59:32serhiy.storchakalinkissue22350 messages
2015-03-22 07:59:32serhiy.storchakacreate