Selaa lähdekoodia

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

Ying Chen 5 vuotta sitten
vanhempi
commit
b45a6bc3b3
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  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('/'):