From 07759f67cb6de63ebb6f2864dd5bc80ea69cd8fa Mon Sep 17 00:00:00 2001 From: K900 Date: Mon, 11 Nov 2019 14:04:14 +0300 Subject: [PATCH] Fix running on Python 3.8 (#161) 3.8 removes the asyncio.streams re-export of `IncompleteReadError`, so just access it directly from `asyncio`, like everywhere else in the code already does. --- mtprotoproxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mtprotoproxy.py b/mtprotoproxy.py index afb1a6c..5a2577d 100755 --- a/mtprotoproxy.py +++ b/mtprotoproxy.py @@ -1533,7 +1533,7 @@ async def handle_client(reader_clt, writer_clt): update_user_stats(user, octets=len(data), msgs=1) wr.write(data, extra) await wr.drain() - except (OSError, asyncio.streams.IncompleteReadError) as e: + except (OSError, asyncio.IncompleteReadError) as e: # print_err(e) pass