Antoine Pitrou <[email protected]> added the comment:
> The issue is that when close() calls flush(), errors are silently
> discarded
This has been fixed in 3.1 and 3.2:
$ ./python -c "with open('/dev/full', 'w') as f: print('a', file=f)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
IOError: [Errno 28] No space left on device
However, it seems sys.stdout has a different treatment:
$ ./python -c "print('a')" > /dev/full
$
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue5321>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com