浏览代码

[core] Fix AttributeError: 'Config' object has no attribute 'get' when running tests

There is an obscure dependency
Romain Rigaux 10 年之前
父节点
当前提交
9da8066
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      apps/sqoop/src/sqoop/conf.py

+ 1 - 1
apps/sqoop/src/sqoop/conf.py

@@ -20,7 +20,6 @@ import os
 from django.utils.translation import ugettext_lazy as _t
 
 from desktop.lib.conf import Config
-from hadoop import cluster
 from sqoop.settings import NICE_NAME
 
 
@@ -38,6 +37,7 @@ SQOOP_CONF_DIR = Config(
 def config_validator(user):
   res = []
 
+  from hadoop import cluster # Avoid dependencies conflicts
   yarn_cluster = cluster.get_cluster_conf_for_job_submission()
 
   if yarn_cluster.SECURITY_ENABLED.get() and not os.path.exists(SQOOP_CONF_DIR.get()):