From b45960212b86a4277d155e74e9c8fbb7c2e54503 Mon Sep 17 00:00:00 2001 From: Eric Blundell Date: Wed, 21 Mar 2018 03:19:09 -0500 Subject: [PATCH] Simplify branch in download_worker exception handler --- pyrogram/client/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index 0776c8d3..cf4deb85 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -609,7 +609,7 @@ class Client: try: os.remove(tmp_file_name) except OSError as e: - if not e.errno == errno.ENOENT: + if e.errno != errno.ENOENT: log.error(e, exc_info=True) log.debug("{} stopped".format(name))