From b12691e86a96c2c3e89a04e29dfc3e71d1b4d631 Mon Sep 17 00:00:00 2001 From: JrD <421273918@qq.com> Date: Fri, 18 Sep 2020 12:20:59 +0800 Subject: [PATCH] debug --- common/utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/common/utils.py b/common/utils.py index dc41686..2d9f949 100644 --- a/common/utils.py +++ b/common/utils.py @@ -743,10 +743,8 @@ def ping_avg_time(nameserver): temp_path = settings.temp_save_dir.joinpath('ping') ping(nameserver, path=temp_path) with open(temp_path, 'r') as f: - print(platform.system()) text = f.read() - print(text) - if '100.0% packet loss' in text or '100% 丢失' in text: + if '100.0% packet loss' in text or '100% packet loss' in text or '100% 丢失' in text: logger.log('ALERT', f'100.0% packet loss, ping {nameserver} failed.') return None elif platform.system() in ('Darwin', 'Linux'):