From 4784ba53e1b226940be4bd20afc3925c82a3692b Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Thu, 18 Jan 2018 12:22:16 +0100 Subject: [PATCH] Remove redundant code --- pyrogram/connection/transport/tcp/tcp_abridged.py | 6 +----- pyrogram/connection/transport/tcp/tcp_intermediate.py | 4 +--- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/pyrogram/connection/transport/tcp/tcp_abridged.py b/pyrogram/connection/transport/tcp/tcp_abridged.py index f23afe4b..acb837af 100644 --- a/pyrogram/connection/transport/tcp/tcp_abridged.py +++ b/pyrogram/connection/transport/tcp/tcp_abridged.py @@ -60,8 +60,4 @@ class TCPAbridged(TCP): if length is None: return None - length = int.from_bytes(length, "little") * 4 - - packet = super().recvall(length) - - return packet + return super().recvall(int.from_bytes(length, "little") * 4) diff --git a/pyrogram/connection/transport/tcp/tcp_intermediate.py b/pyrogram/connection/transport/tcp/tcp_intermediate.py index 0ba31c85..301a88f6 100644 --- a/pyrogram/connection/transport/tcp/tcp_intermediate.py +++ b/pyrogram/connection/transport/tcp/tcp_intermediate.py @@ -50,6 +50,4 @@ class TCPIntermediate(TCP): if length is None: return None - packet = super().recvall(unpack("