remove exceptions, who needs those anyway
This commit is contained in:
parent
33b053f1f9
commit
c78b0cfcb1
1 changed files with 2 additions and 16 deletions
18
pingplace.py
18
pingplace.py
|
@ -6,22 +6,8 @@ def one_ping(socket, address):
|
||||||
destination=address,
|
destination=address,
|
||||||
id=1,
|
id=1,
|
||||||
sequence=1)
|
sequence=1)
|
||||||
try:
|
print("sending packet to %s" % address)
|
||||||
print("sending packet to %s" % address)
|
socket.send(request)
|
||||||
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)
|
|
||||||
|
|
||||||
# settings
|
# settings
|
||||||
x=0
|
x=0
|
||||||
|
|
Loading…
Reference in a new issue