From b49030eb10b8a2fc7c737683e53f29c115591f23 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sat, 30 Jun 2018 11:30:32 +0200 Subject: [PATCH] Shorter conditions --- pyrogram/client/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index c4fc7e3a..cee39141 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -1082,8 +1082,8 @@ class Client(Methods, BaseClient): part_size = 512 * 1024 file_size = os.path.getsize(path) file_total_parts = int(math.ceil(file_size / part_size)) - is_big = True if file_size > 10 * 1024 * 1024 else False - is_missing_part = True if file_id is not None else False + is_big = file_size > 10 * 1024 * 1024 + is_missing_part = file_id is not None file_id = file_id or self.rnd_id() md5_sum = md5() if not is_big and not is_missing_part else None session = Session(self, self.dc_id, self.auth_key, is_media=True)