浏览代码

HUE-4096 [oozie] Fix unit tests for HUE-4054

krish 9 年之前
父节点
当前提交
9bd1d989d5
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      desktop/libs/liboozie/src/liboozie/submission2.py

+ 3 - 2
desktop/libs/liboozie/src/liboozie/submission2.py

@@ -89,8 +89,6 @@ class Submission(object):
         properties['end_date'] = convert_to_server_timezone(self.properties['end_date'], local_tz)
 
     self.properties['security_enabled'] = self.api.security_enabled
-    if 'oozie.use.system.libpath' not in properties:
-        properties['oozie.use.system.libpath'] = 'true'
 
   def __str__(self):
     if self.oozie_id:
@@ -108,6 +106,9 @@ class Submission(object):
     Returns the oozie job id if all goes well.
     """
 
+    if self.properties and 'oozie.use.system.libpath' not in self.properties:
+      self.properties['oozie.use.system.libpath'] = 'true'
+
     self.oozie_id = self.api.submit_job(self.properties)
     LOG.info("Submitted: %s" % (self,))