diff --git a/sau/services.py b/sau/services.py index 7c41631..f8dff21 100644 --- a/sau/services.py +++ b/sau/services.py @@ -140,11 +140,11 @@ def restart_services(): if _get_deleted_open_files(proc): tested_parents.add(parent) service = _get_service_from_proc(parent) - policy = _get_service_restart_policy(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 continue + policy = _get_service_restart_policy(service) log.debug('{} is in service {}'.format(proc, service)) if parent_name in services and not services[parent_name]: