[issue5860] TextIOWrapper: bad error reporting when write() is forbidden

2009-04-27 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: -> duplicate status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue5860] TextIOWrapper: bad error reporting when write() is forbidden

2009-04-27 Thread DSM
DSM added the comment: See also http://bugs.python.org/issue5844 , which contains a patch to test. -- nosy: +dsm001 ___ Python tracker ___ ___

[issue5860] TextIOWrapper: bad error reporting when write() is forbidden

2009-04-27 Thread Antoine Pitrou
New submission from Antoine Pitrou : Opening an existing file in read-only text mode and trying to write to it: >>> f = open("LICENSE") >>> f.write("") Traceback (most recent call last): File "", line 1, in SystemError: null argument to internal routine Binary files get it right though: >>>