changeset c2066eee572f in trytond:6.0
details: https://hg.tryton.org/trytond?cmd=changeset&node=c2066eee572f
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 ef52a8340e67 -r c2066eee572f trytond/protocols/dispatcher.py
--- a/trytond/protocols/dispatcher.py Fri Nov 19 23:56:36 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
import time
@@ -155,7 +154,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