浏览代码

HUE-5415 [metadata] Rename client command

Romain Rigaux 9 年之前
父节点
当前提交
a4beea2
共有 1 个文件被更改,包括 8 次插入8 次删除
  1. 8 8
      desktop/libs/metadata/src/metadata/optimizer_client.py

+ 8 - 8
desktop/libs/metadata/src/metadata/optimizer_client.py

@@ -78,16 +78,16 @@ class OptimizerApi(object):
     response = {'status': 'error'}
     response = {'status': 'error'}
 
 
     try:
     try:
-      data = subprocess.check_output([
-          'cws',
+      cmd_args = [
+          'ccs',
           'navopt',
           'navopt',
           '--endpoint-url=%s' % self._api_url,
           '--endpoint-url=%s' % self._api_url,
-          command,
-          '--auth-config',
-          self._product_secret
-         ] +
-         args
-      )
+          command
+      ]
+      if self._product_secret:
+        cmd_args += ['--auth-config', self._product_secret]
+
+      data = subprocess.check_output(cmd_args + args)
     except CalledProcessError, e:
     except CalledProcessError, e:
       if command == 'upload' and e.returncode == 1:
       if command == 'upload' and e.returncode == 1:
         LOG.info('Upload command is successful despite return code of 1: %s' % e.output)
         LOG.info('Upload command is successful despite return code of 1: %s' % e.output)