remove exceptions, who needs those anyway

This commit is contained in:
Aaron Riedel 2023-07-18 10:21:02 +02:00
parent 33b053f1f9
commit c78b0cfcb1
Signed by: aaron
GPG key ID: 643004654D40D577

View file

@ -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