diff --git a/common/command.py b/common/command.py index 4b68d764..a3770e43 100644 --- a/common/command.py +++ b/common/command.py @@ -30,7 +30,6 @@ def __init__(self, stdio=None): def run(self, cmd): try: self.stdio.verbose("[local host] run cmd = [{0}] on localhost".format(cmd)) - out = subprocess.Popen(cmd, stderr=subprocess.STDOUT, stdout=subprocess.PIPE, shell=True, executable='/bin/bash') stdout, stderr = out.communicate() if stderr: @@ -350,7 +349,6 @@ def get_observer_version_by_sql(ob_cluster, stdio=None): ob_version_info = ob_connector.execute_sql("select version();") except Exception as e: raise Exception("get_observer_version_by_sql Exception. Maybe cluster'info is error: " + e.__str__()) - ob_version = ob_version_info[0] stdio.verbose("get_observer_version_by_sql ob_version_info is {0}".format(ob_version)) version = re.findall(r'OceanBase(_)?(.CE)?-v(.+)', ob_version[0])