only take running services

This commit is contained in:
Oran Nadler 2018-04-30 16:44:43 +03:00
parent ebda00b333
commit d59e464578
1 changed files with 7 additions and 3 deletions

View File

@ -214,9 +214,10 @@ class Machine(object):
name = name.lower()
for ser in services:
if ser in name:
return True
return name in services
#for ser in services:
# if ser in name:
# return True
return False
@ -240,6 +241,9 @@ class Machine(object):
if not IsNameOfCriticalService(service_name):
continue
if eval(service["State"]) != "Running":
continue
found.append(service_name)
return found