Browse Source

HUE-8639 [metadata] Do not do Sentry filtering when Sentry is not configured

Romain Rigaux 7 năm trước cách đây
mục cha
commit
fd0cd4f
1 tập tin đã thay đổi với 4 bổ sung5 xóa
  1. 4 5
      desktop/libs/metadata/src/metadata/conf.py

+ 4 - 5
desktop/libs/metadata/src/metadata/conf.py

@@ -27,6 +27,7 @@ from desktop.lib.paths import get_config_root
 
 from metadata.settings import DJANGO_APPS
 
+
 OPTIMIZER_AUTH_PASSWORD = None
 NAVIGATOR_AUTH_PASSWORD = None
 
@@ -69,11 +70,9 @@ def has_navigator(user):
 
 
 def get_security_default():
-  '''Get default security value from Hadoop'''
-  from hadoop import cluster # Avoid dependencies conflicts
-  cluster = cluster.get_yarn()
-
-  return cluster.SECURITY_ENABLED.get()
+  from libsentry.conf import is_enabled
+  
+  return is_enabled()
 
 
 def get_optimizer_password_script():