fix service check

This commit is contained in:
Fredrik Eriksson 2019-12-16 21:21:59 +01:00
parent aadd0e2641
commit 44088bd64b
Signed by: feffe
GPG Key ID: 18524638BE25530A

View File

@ -140,11 +140,11 @@ def restart_services():
if _get_deleted_open_files(proc): if _get_deleted_open_files(proc):
tested_parents.add(parent) tested_parents.add(parent)
service = _get_service_from_proc(parent) service = _get_service_from_proc(parent)
policy = _get_service_restart_policy(service)
if not service: if not service:
_warn(policy, 'could not re-check process {} - failed to identify service'.format(proc)) log.warning('could not re-check process {} - failed to identify service'.format(proc))
recommend_restart = True recommend_restart = True
continue continue
policy = _get_service_restart_policy(service)
log.debug('{} is in service {}'.format(proc, service)) log.debug('{} is in service {}'.format(proc, service))
if parent_name in services and not services[parent_name]: if parent_name in services and not services[parent_name]: