summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/asyncio/proactor_events.py5
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')