From f0adbd88d07cf762f3b12da899cc75f1c9769dca Mon Sep 17 00:00:00 2001 From: Void User Date: Sun, 22 Jan 2023 13:23:28 +0300 Subject: [PATCH] Catch e --- ping.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ping.py b/ping.py index 07532ce..f430720 100644 --- a/ping.py +++ b/ping.py @@ -46,5 +46,10 @@ while True: ttime = 0 except Exception as e: - print(e) + if e == '[Errno 32] Broken pipe': + sleep(60) + ttime = 59 + print("CATCHED") + else: + print(e)