diff --git a/tests/pytest/util/sql.py b/tests/pytest/util/sql.py index adb49760bdf7199fc3dbcb73ddb99687cf421f3a..16931cca333a3300b7d0d6831bbb51db0238b1d1 100644 --- a/tests/pytest/util/sql.py +++ b/tests/pytest/util/sql.py @@ -194,9 +194,13 @@ class TDSql: pstate = 0 pl = psutil.pids() for pid in pl: - if psutil.Process(pid).name() == 'taosd': - pstate = 1 - break + try: + if psutil.Process(pid).name() == 'taosd': + print('have already started') + pstate = 1 + break + except psutil.NoSuchProcess: + pass if pstate == state :break if state or pstate: tdLog.sleep(1)