correct iossue
This commit is contained in:
parent
e79464f51d
commit
7db9179a0d
@ -47,9 +47,9 @@ class Container(object):
|
|||||||
try:
|
try:
|
||||||
proc=subprocess.check_output([cmd,'ps'],stderr=subprocess.STDOUT)
|
proc=subprocess.check_output([cmd,'ps'],stderr=subprocess.STDOUT)
|
||||||
except:
|
except:
|
||||||
proc=""
|
proc=b''
|
||||||
pass
|
pass
|
||||||
|
proc.decode('UTF-8')
|
||||||
if (proc.find(self.name) != -1):
|
if (proc.find(self.name) != -1):
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
@ -61,7 +61,7 @@ if __name__ == '__main__':
|
|||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
|
|
||||||
for serviceName in services:
|
for serviceName in services:
|
||||||
serviceObj=Service("serviceName")
|
serviceObj=Service(serviceName)
|
||||||
if (serviceObj.is_active()):
|
if (serviceObj.is_active()):
|
||||||
print (f"{serviceObj.name} is active")
|
print (f"{serviceObj.name} is active")
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user