diff options
author | Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com> | 2017-06-10 02:56:34 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2017-06-10 02:56:34 (GMT) |
commit | 34792d25ab7329241ea24595286d65d54c266274 (patch) | |
tree | 09b583ae56aedc58e936723d68cc9ff1a3059710 /Lib/asyncio | |
parent | 42e3acda86829def9adc354fbee77597b849bf9e (diff) | |
download | cpython-34792d25ab7329241ea24595286d65d54c266274.zip cpython-34792d25ab7329241ea24595286d65d54c266274.tar.gz cpython-34792d25ab7329241ea24595286d65d54c266274.tar.bz2 |
Fix TypeError is asyncio/proactor_events (#993)
Diffstat (limited to 'Lib/asyncio')
-rw-r--r-- | Lib/asyncio/proactor_events.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/asyncio/proactor_events.py b/Lib/asyncio/proactor_events.py index c85d4da..642f61e 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') |