From 44088bd64b74cff31ca8e7f4cc41e4020be49d30 Mon Sep 17 00:00:00 2001 From: Fredrik Eriksson Date: Mon, 16 Dec 2019 21:21:59 +0100 Subject: [PATCH] fix service check --- sau/services.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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]: