From: Jim Fasarakis-Hilliard Date: Sat, 10 Jun 2017 02:56:34 +0000 (+0300) Subject: Fix TypeError is asyncio/proactor_events (#993) X-Git-Tag: v3.7.0a1~644 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=34792d25ab7329241ea24595286d65d54c266274;p=thirdparty%2FPython%2Fcpython.git Fix TypeError is asyncio/proactor_events (#993) --- diff --git a/Lib/asyncio/proactor_events.py b/Lib/asyncio/proactor_events.py index c85d4dafddb2..642f61e3563c 100644 --- a/Lib/asyncio/proactor_events.py +++ b/Lib/asyncio/proactor_events.py @@ -227,8 +227,9 @@ class _ProactorBaseWritePipeTransport(_ProactorBasePipeTransport, def write(self, data): if not isinstance(data, (bytes, bytearray, memoryview)): - raise TypeError('data argument must be byte-ish (%r)', - type(data)) + msg = ("data argument must be a bytes-like object, not '%s'" % + type(data).__name__) + raise TypeError(msg) if self._eof_written: raise RuntimeError('write_eof() already called')