Pārlūkot izejas kodu

HUE-9089 [thrift] Fix e.message in py3

Ying Chen 5 gadi atpakaļ
vecāks
revīzija
f9dbc61f4f
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      desktop/core/src/desktop/lib/thrift_util.py

+ 1 - 1
desktop/core/src/desktop/lib/thrift_util.py

@@ -520,7 +520,7 @@ class SuperClient(object):
               raise
         except Exception as e:
           logging.exception("Thrift saw exception (this may be expected).")
-          if "'client_protocol' is unset" in e.message:
+          if "'client_protocol' is unset" in str(e):
             raise StructuredException(
               'OPEN_SESSION',
               'Thrift version configured by property thrift_version might be too high. Request failed with "%s"' % str(e),