changeset bed496103a5c in trytond:5.0
details: https://hg.tryton.org/trytond?cmd=changeset&node=bed496103a5c
description:
Use HTTPStatus instead of http.client
Status in http.client is deprecated since 3.5
(grafted from 6b2ebf559245979bf0ee7262cde76aafb4f10620)
diffstat:
trytond/protocols/dispatcher.py | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diffs (20 lines):
diff -r fe1ec470d28c -r bed496103a5c trytond/protocols/dispatcher.py
--- a/trytond/protocols/dispatcher.py Fri Nov 05 00:02:40 2021 +0100
+++ b/trytond/protocols/dispatcher.py Tue Nov 23 16:24:44 2021 +0100
@@ -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
try:
@@ -153,7 +152,7 @@
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