Explorar o código

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

Ying Chen %!s(int64=5) %!d(string=hai) anos
pai
achega
b45a6bc3b3
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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('/'):