Skip to content

Commit cf9fb26

Browse files
authored
Merge pull request #74 from mocobeta/feat/fix-benchUtil-bug
Fix a bug in benchUtil.run() method
2 parents 436e7b7 + c98e0ec commit cf9fb26

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/python/benchUtil.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import QPSChart
3535
import IndexChart
3636
import subprocess
37+
import shlex
3738

3839
PYTHON_MAJOR_VER = sys.version_info.major
3940

@@ -725,7 +726,7 @@ def run(cmd, logFile=None, indent=' '):
725726
out = open(logFile, 'wb')
726727
else:
727728
out = subprocess.STDOUT
728-
p = subprocess.Popen(cmd.split(), shell=False, stdout=out, stderr=out, close_fds=True)
729+
p = subprocess.Popen(shlex.split(cmd), shell=False, stdout=out, stderr=out, close_fds=True)
729730
if p.wait():
730731
if logFile is not None and os.path.getsize(logFile) < 50*1024:
731732
print(open(logFile).read())

0 commit comments

Comments
 (0)