Browse Source

AMBARI-14926. ambari cached hdfs.py conflicts with python hdfs lib resulting into monitoring errors (aonishuk)

Andrew Onishuk 9 năm trước cách đây
mục cha
commit
93624db6d7

+ 1 - 1
ambari-agent/src/main/python/ambari_agent/PythonReflectiveExecutor.py

@@ -84,7 +84,7 @@ class PythonContext:
     self.old_logging_disable = logging.root.manager.disable
     
     logging.disable(logging.ERROR)
-    sys.path.append(self.script_dir)
+    sys.path.insert(0, self.script_dir)
     sys.argv = self.pythonCommand[1:]
 
   def __exit__(self, exc_type, exc_val, exc_tb):