提交 daed75c6 编写于 作者: H HongyiSun 提交者: Qi Luo

Scripts: fix bugs on escape characters

上级 3f0282f5
......@@ -253,7 +253,7 @@ class Recorder(object):
@staticmethod
def is_running():
"""Test if the given process running."""
_, stdout, _ = shell_cmd('pgrep -f "cyber_recorder record" | grep -cv '^1$'', False)
_, stdout, _ = shell_cmd('pgrep -f "cyber_recorder record" | grep -cv \'^1$\'', False)
# If stdout is the pgrep command itself, no such process is running.
return stdout.strip() != '1' if stdout else False
......
......@@ -169,7 +169,7 @@ class Recorder(object):
@staticmethod
def is_running():
"""Test if the given process running."""
_, stdout, _ = shell_cmd('pgrep -f "cyber_recorder record" | grep -cv '^1$'', False)
_, stdout, _ = shell_cmd('pgrep -f "cyber_recorder record" | grep -cv \'^1$\'', False)
# If stdout is the pgrep command itself, no such process is running.
return stdout.strip() != '1' if stdout else False
......
......@@ -142,7 +142,7 @@ class Recorder(object):
@staticmethod
def is_running():
"""Test if the given process running."""
_, stdout, _ = shell_cmd('pgrep -f "smart_recorder" | grep -cv '^1$'', False)
_, stdout, _ = shell_cmd('pgrep -f "smart_recorder" | grep -cv \'^1$\'', False)
# If stdout is the pgrep command itself, no such process is running.
return stdout.strip() != '1' if stdout else False
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册