process CancelledError

This commit is contained in:
Devaev Maxim
2019-06-08 04:15:20 +03:00
parent 445f2f9e63
commit 77a7498731
3 changed files with 10 additions and 0 deletions

View File

@@ -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