mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-30 17:41:54 +08:00
asyncio.CancelledError is a subclass of BaseException since 3.8
This commit is contained in:
@@ -20,8 +20,6 @@
|
||||
# ========================================================================== #
|
||||
|
||||
|
||||
import asyncio
|
||||
|
||||
from typing import Dict
|
||||
from typing import Optional
|
||||
|
||||
@@ -92,8 +90,6 @@ 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