From a71b3b5fa0a814c1610b2c685ca8bcbbb233e52a Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Fri, 22 Jun 2018 15:12:56 +0200 Subject: [lint] Limit unneccessarily broad except clauses Add exception qualifier(s) to bare except clauses swallowing exceptions. --- discord/client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'discord/client.py') diff --git a/discord/client.py b/discord/client.py index 23907574..6251e65e 100644 --- a/discord/client.py +++ b/discord/client.py @@ -444,7 +444,7 @@ class Client: for voice in self.voice_clients: try: await voice.disconnect() - except: + except Exception: # if an error happens during disconnects, disregard it. pass @@ -489,7 +489,7 @@ class Client: def _silence_gathered(fut): try: fut.result() - except: + except Exception: pass finally: loop.stop() @@ -516,7 +516,7 @@ class Client: try: return task.result() # suppress unused task warning - except: + except Exception: return None def run(self, *args, **kwargs): -- cgit v1.2.3