1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 00:25:08 +00:00

[cleanup] Misc fixes

Closes #7528
This commit is contained in:
pukkandan
2023-07-22 09:08:12 +05:30
parent e0c4db04dc
commit 62b5c94cad
12 changed files with 37 additions and 32 deletions

View File

@ -105,7 +105,7 @@ class RequestDirector:
_REQUEST_HANDLERS = {}
def register(handler):
def register_rh(handler):
"""Register a RequestHandler class"""
assert issubclass(handler, RequestHandler), f'{handler} must be a subclass of RequestHandler'
assert handler.RH_KEY not in _REQUEST_HANDLERS, f'RequestHandler {handler.RH_KEY} already registered'