From 1c93f6a562d1c2106d148cebb128397989fb84fd Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Thu, 28 May 2020 11:03:49 +0300 Subject: refactoring --- kvmd/plugins/auth/http.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'kvmd/plugins/auth') 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) -- cgit v1.2.3