From 7f00c93001fbc200a18b32e0dd55259246e9197a Mon Sep 17 00:00:00 2001 From: Kilian Krause Date: Thu, 6 Jul 2023 00:20:27 +0200 Subject: [PATCH] fix worker class detection --- src/capport/api/hypercorn_run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/capport/api/hypercorn_run.py b/src/capport/api/hypercorn_run.py index 294fce6..330ed41 100644 --- a/src/capport/api/hypercorn_run.py +++ b/src/capport/api/hypercorn_run.py @@ -9,7 +9,7 @@ import capport.config def run(config: hypercorn.config.Config) -> None: sockets = config.create_sockets() - if type(config.worker_class) != 'trio': + if config.worker_class != 'trio': raise Exception('Invalid worker class received from constructor') hypercorn.trio.run.trio_worker(config=config, sockets=sockets)