From c78b0cfcb1517905435ca448f4de3f19bba3c5ff Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Tue, 18 Jul 2023 10:21:02 +0200 Subject: [PATCH] remove exceptions, who needs those anyway --- pingplace.py | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/pingplace.py b/pingplace.py index cf1cfed..ff22d57 100644 --- a/pingplace.py +++ b/pingplace.py @@ -6,22 +6,8 @@ def one_ping(socket, address): destination=address, id=1, sequence=1) - try: - print("sending packet to %s" % address) - socket.send(request) - return - except TimeoutExceeded as err: - # The timeout has been reached - print(err) - except DestinationUnreachable as err: - # The reply indicates that the destination host is unreachable - print(err) - except TimeExceeded as err: - # The reply indicates that the time to live exceeded in transit - print(err) - except ICMPLibError as err: - # All other errors - print(err) + print("sending packet to %s" % address) + socket.send(request) # settings x=0