- commit
- 26791f4cc6f71bdef3f1039313d48b6559d49ea2
- parent
- 0f3d1cf760ba74ec9a006ebe5805e59a31a7e587
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2026-09-25 17:41
lint: exceptions
Diffstat
| M | dropin.py | 7 | ++++--- |
1 files changed, 4 insertions, 3 deletions
diff --git a/dropin.py b/dropin.py
@@ -1,6 +1,7 @@ 1 1 import argparse 2 2 import asyncio 3 3 import base64 -1 4 import binascii 4 5 import datetime 5 6 import functools 6 7 import json @@ -136,7 +137,7 @@ class Auth: 136 137 for i in range(4): 137 138 try: 138 139 return json.loads(base64.urlsafe_b64decode(raw + '=' * i))139 -1 except Exception:-1 140 except binascii.Error: 140 141 pass 141 142 raise ValueError(s) 142 143 @@ -202,7 +203,7 @@ def async_cache(func): 202 203 cache[key] = (time.time() + duration, future) 203 204 try: 204 205 future.set_result(await func(*args, **kwargs))205 -1 except Exception as e:-1 206 except Exception as e: # noqa BLE001 206 207 future.set_exception(e) 207 208 del cache[key] 208 209 return await future @@ -367,7 +368,7 @@ async def get_next(data): 367 368 for episode in season: 368 369 if episode['type'] == 'video': 369 370 return episode['id']370 -1 except Exception:-1 371 except Exception: # noqa: BLE001 371 372 return None 372 373 373 374