From 9a01374ab991cef98c437f68b89b2ccbd9ee8b8c Mon Sep 17 00:00:00 2001 From: Nicolas Badoux Date: Wed, 15 Nov 2017 14:04:37 +0100 Subject: [PATCH] Fix bop-32034. Making expected optional in IncompletereadError --- Lib/asyncio/streams.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/asyncio/streams.py b/Lib/asyncio/streams.py index 9fda8537686d0a..722e3b9e6dc128 100644 --- a/Lib/asyncio/streams.py +++ b/Lib/asyncio/streams.py @@ -29,7 +29,7 @@ class IncompleteReadError(EOFError): - partial: read bytes string before the end of stream was reached - expected: total number of expected bytes (or None if unknown) """ - def __init__(self, partial, expected): + def __init__(self, partial, expected=None): super().__init__("%d bytes read on a total of %r expected bytes" % (len(partial), expected)) self.partial = partial