Roger Serwy <roger.se...@gmail.com> added the comment:

I tested blockfile-3.diff against the latest code in the repository.

sys.stdin.write returns the wrong error message when passed a non-string. 
Presently it returns io.UnsupportedOperation instead of TypeError: must be str, 
not ...

The attached blockfile-4.diff incorporates blockfile-3 and creates a decorator 
in _RPCFile to ensure the argument is a string and applies it to the 
_RPCInputFile and _RPCOutputFile write methods.

A simpler alternative would be duplicating the string check code in 
_RPCInputFile before the raise statement.

----------
Added file: http://bugs.python.org/file26362/blockfile-4.diff

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

Reply via email to