changeset 011f728fd78b in modules/web_shortener:default
details: 
https://hg.tryton.org/modules/web_shortener?cmd=changeset;node=011f728fd78b
description:
        Fix HTTPStatus import for Python 3.4
diffstat:

 routes.py |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (15 lines):

diff -r 6b0a5b3ed10c -r 011f728fd78b routes.py
--- a/routes.py Sat Mar 30 17:57:44 2019 +0100
+++ b/routes.py Sat Mar 30 18:15:41 2019 +0100
@@ -1,7 +1,10 @@
 # This file is part of Tryton.  The COPYRIGHT file at the top level of
 # this repository contains the full copyright notices and license terms.
 
-from http import HTTPStatus
+try:
+    from http import HTTPStatus
+except ImportError:
+    from http import client as HTTPStatus
 
 from werkzeug.utils import redirect
 from werkzeug.exceptions import abort

Reply via email to