From 77a749873119252dec64245e3a3de9c08bd6cd2f Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Sat, 8 Jun 2019 04:15:20 +0300 Subject: process CancelledError --- kvmd/plugins/auth/http.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'kvmd/plugins') diff --git a/kvmd/plugins/auth/http.py b/kvmd/plugins/auth/http.py index 85156a1a..bc391d79 100644 --- a/kvmd/plugins/auth/http.py +++ b/kvmd/plugins/auth/http.py @@ -20,6 +20,8 @@ # ========================================================================== # +import asyncio + from typing import Dict from typing import Optional @@ -86,6 +88,8 @@ class Plugin(BaseAuthService): response.raise_for_status() assert response.status == 200 return True + except asyncio.CancelledError: # pylint: disable=try-except-raise + raise except Exception: get_logger().exception("Failed HTTP auth request for user %r", user) return False -- cgit v1.2.3