From abaaeff5d9d73c1a969b35119b9100ba47383768 Mon Sep 17 00:00:00 2001 From: huoji Date: Fri, 23 Sep 2022 20:33:43 +0800 Subject: [PATCH] Update hash_white_list.py --- Server/hash_white_list.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Server/hash_white_list.py b/Server/hash_white_list.py index 4fff18f..d8c49ba 100644 --- a/Server/hash_white_list.py +++ b/Server/hash_white_list.py @@ -30,11 +30,13 @@ def check_in_while_list(process: process.Process): is_white = process.is_white or process.chain.root_process.is_white or process.parent_process.is_white if is_white == False: while parent_process: - if parent_process is None or parent_process == process.chain.root_process: + if parent_process is None: break if parent_process.is_white: is_white = True break + if parent_process == process.chain.root_process: + break parent_process = parent_process.parent_process return is_white