Commit 34792d25 authored by Jim Fasarakis-Hilliard's avatar Jim Fasarakis-Hilliard Committed by Yury Selivanov

Fix TypeError is asyncio/proactor_events (#993)

parent 42e3acda
......@@ -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')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment