From 357dfd928620d619c9cc3fb8214b385f60a14635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 23 Nov 2021 16:24:44 +0100 Subject: [PATCH] Use HTTPStatus instead of http.client Status in http.client is deprecated since 3.5 --- trytond/protocols/dispatcher.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/trytond/protocols/dispatcher.py b/trytond/protocols/dispatcher.py index c756f48535..a5f184b38c 100644 --- a/trytond/protocols/dispatcher.py +++ b/trytond/protocols/dispatcher.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -import http.client import logging import pydoc import time @@ -155,7 +154,7 @@ def _dispatch(request, pool, *args, **kwargs): context = {'_request': request.context} if not security.check_timeout( pool.database_name, user, session, context=context): - abort(http.client.UNAUTHORIZED) + abort(HTTPStatus.UNAUTHORIZED) log_message = '%s.%s(*%s, **%s) from %s@%s%s' username = request.authorization.username