mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 09:01:54 +08:00
process CancelledError
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user