changeset efa98c168ea0 in tryton:default
details: https://hg.tryton.org/tryton?cmd=changeset;node=efa98c168ea0
description:
        Replace value attribute of HTTPStatus by int call

        In Python3.4, HTTPStatus are not yet enums but just integers.

        issue7945
        review54471002
diffstat:

 tryton/common/common.py |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r e22f72bfb356 -r efa98c168ea0 tryton/common/common.py
--- a/tryton/common/common.py   Wed Jan 02 18:59:47 2019 +0100
+++ b/tryton/common/common.py   Wed Jan 02 19:01:08 2019 +0100
@@ -984,7 +984,7 @@
                     return rpc_execute(*args)
             else:
                 message(_('Concurrency Exception'), msg_type=gtk.MESSAGE_ERROR)
-        elif exception.faultCode == str(HTTPStatus.UNAUTHORIZED.value):
+        elif exception.faultCode == str(int(HTTPStatus.UNAUTHORIZED)):
             from tryton.gui.main import Main
             if PLOCK.acquire(False):
                 try:
@@ -1011,7 +1011,7 @@
             try:
                 func(parameters)
             except TrytonServerError as exception:
-                if exception.faultCode == str(HTTPStatus.UNAUTHORIZED.value):
+                if exception.faultCode == str(int(HTTPStatus.UNAUTHORIZED)):
                     parameters.clear()
                     continue
                 if exception.faultCode != 'LoginException':

Reply via email to