diff options
| author | Hornwitser <[email protected]> | 2018-06-22 15:12:56 +0200 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2018-11-24 22:17:57 -0500 |
| commit | a71b3b5fa0a814c1610b2c685ca8bcbbb233e52a (patch) | |
| tree | 6e99e481ae99f632f89e906eaffbdb854bb13715 /discord/client.py | |
| parent | Revert "Rework documentation to not duplicate inherited members." (diff) | |
| download | discord.py-a71b3b5fa0a814c1610b2c685ca8bcbbb233e52a.tar.xz discord.py-a71b3b5fa0a814c1610b2c685ca8bcbbb233e52a.zip | |
[lint] Limit unneccessarily broad except clauses
Add exception qualifier(s) to bare except clauses swallowing exceptions.
Diffstat (limited to 'discord/client.py')
| -rw-r--r-- | discord/client.py | 6 |
1 files changed, 3 insertions, 3 deletions
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): |