浏览代码

[indexer] Fix quoting and python version

Use Popen for 2.6 compatibility
Abraham Elmahrek 11 年之前
父节点
当前提交
16ac841
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 2 1
      desktop/libs/indexer/src/indexer/conf.py
  2. 1 1
      desktop/libs/indexer/src/indexer/controller.py

+ 2 - 1
desktop/libs/indexer/src/indexer/conf.py

@@ -29,7 +29,8 @@ def solrctl():
   solrctl path
   """
   try:
-    return subprocess.check_output(['which', 'solrctl']).strip()
+    proc = subprocess.Popen(['which', 'solrctl'], stdout=subprocess.PIPE)
+    return proc.stdout.read().strip()
   except subprocess.CalledProcessError:
     return '/usr/bin/solrctl'
 

+ 1 - 1
desktop/libs/indexer/src/indexer/controller.py

@@ -92,7 +92,7 @@ class CollectionManagerController(object):
                                stderr=subprocess.PIPE,
                                env={
                                  'SOLR_HOME': conf.SOLR_HOME.get(),
-                                 'SOLR_ZK_ENSEMBLE': 'conf.SOLR_ZK_ENSEMBLE.get()'
+                                 'SOLR_ZK_ENSEMBLE': conf.SOLR_ZK_ENSEMBLE.get()
                                })
     status = process.wait()