<test>fix psutil.process error
This commit is contained in:
parent
a9da437d02
commit
d1ee728376
|
@ -194,9 +194,13 @@ class TDSql:
|
||||||
pstate = 0
|
pstate = 0
|
||||||
pl = psutil.pids()
|
pl = psutil.pids()
|
||||||
for pid in pl:
|
for pid in pl:
|
||||||
if psutil.Process(pid).name() == 'taosd':
|
try:
|
||||||
pstate = 1
|
if psutil.Process(pid).name() == 'taosd':
|
||||||
break
|
print('have already started')
|
||||||
|
pstate = 1
|
||||||
|
break
|
||||||
|
except psutil.NoSuchProcess:
|
||||||
|
pass
|
||||||
if pstate == state :break
|
if pstate == state :break
|
||||||
if state or pstate:
|
if state or pstate:
|
||||||
tdLog.sleep(1)
|
tdLog.sleep(1)
|
||||||
|
|
Loading…
Reference in New Issue