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,
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue