Browse Source

HUE-8737 [security] Fix security unit test in py3

Ying Chen 5 năm trước cách đây
mục cha
commit
b45a6bc3b3
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      apps/security/src/security/api/hive.py

+ 2 - 0
apps/security/src/security/api/hive.py

@@ -141,6 +141,8 @@ def _hive_add_privileges(user, role, privileges):
 
 def _massage_uri(uri):
   if uri:
+    if not isinstance(uri, str):
+      uri = uri.decode('utf-8')
     if uri.startswith('hdfs:///'):
       uri = uri.replace('hdfs://', get_defaultfs())
     elif uri.startswith('/'):