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() 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
@ -239,6 +240,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)