diff options
author | Devaev Maxim <[email protected]> | 2020-05-28 11:03:49 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-05-28 11:03:49 +0300 |
commit | 1c93f6a562d1c2106d148cebb128397989fb84fd (patch) | |
tree | 8065e45b9a07004b5823d8f57a3272796aeb2704 /kvmd/plugins | |
parent | fbdfb009a1f752236eeacc8c2528167a64d5d3a8 (diff) |
refactoring
Diffstat (limited to 'kvmd/plugins')
-rw-r--r-- | kvmd/plugins/auth/http.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/kvmd/plugins/auth/http.py b/kvmd/plugins/auth/http.py index c87d624a..4e826726 100644 --- a/kvmd/plugins/auth/http.py +++ b/kvmd/plugins/auth/http.py @@ -33,8 +33,7 @@ from ...validators.basic import valid_float_f01 from ...logging import get_logger -from ... import make_user_agent -from ... import aiotools +from ... import htclient from . import BaseAuthService @@ -86,11 +85,11 @@ class Plugin(BaseAuthService): "secret": self.__secret, }, headers={ - "User-Agent": make_user_agent("KVMD"), + "User-Agent": htclient.make_user_agent("KVMD"), "X-KVMD-User": user, }, ) as response: - aiotools.raise_not_200(response) + htclient.raise_not_200(response) return True except Exception: get_logger().exception("Failed HTTP auth request for user %r", user) |