From 7456538907577c9d45f8645f24e6a8e58c2695e1 Mon Sep 17 00:00:00 2001 From: Fredrik Eriksson Date: Mon, 24 Jun 2019 18:07:45 +0200 Subject: [PATCH] fixed sanity-check on parent in restart_services --- sau/services.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sau/services.py b/sau/services.py index 14e9404..1ac370d 100644 --- a/sau/services.py +++ b/sau/services.py @@ -124,12 +124,12 @@ def restart_services(): tested_parents = set() for proc in retest_procs: parent = _get_top_parent(proc) + if not parent: + continue parent_name = parent.name() if parent in tested_parents: log.debug('{} belongs to already tested parent {}'.format(proc, parent)) continue - if not parent: - continue if _get_deleted_open_files(proc): tested_parents.add(parent)