only take running services
This commit is contained in:
parent
ebda00b333
commit
d59e464578
|
@ -214,9 +214,10 @@ class Machine(object):
|
||||||
|
|
||||||
name = name.lower()
|
name = name.lower()
|
||||||
|
|
||||||
for ser in services:
|
return name in services
|
||||||
if ser in name:
|
#for ser in services:
|
||||||
return True
|
# if ser in name:
|
||||||
|
# return True
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -240,6 +241,9 @@ class Machine(object):
|
||||||
if not IsNameOfCriticalService(service_name):
|
if not IsNameOfCriticalService(service_name):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if eval(service["State"]) != "Running":
|
||||||
|
continue
|
||||||
|
|
||||||
found.append(service_name)
|
found.append(service_name)
|
||||||
|
|
||||||
return found
|
return found
|
||||||
|
|
Loading…
Reference in New Issue