Skip to content

No route to host error. #2

@sshah254

Description

@sshah254

Hi,

Thanks for creating this tool.

If I lose my wifi connection, then I get this error (I am pinging 10.10.1.119:

Exception in thread 10.10.1.119:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "ping.py", line 58, in run
self._function(self._args)
File "ping.py", line 223, in _ping
self.sock.send(self._icmp_create(pdata))
error: [Errno 65] No route to host

Let me know if you can fix the issue, or how I can fix it. A try / catch block might help there.

On lines 298, 311, and 313 you are using str as a variable which is a reserved word in Python (I switched it to str1, maybe you can do something similar).

For my own purposes, I changed line 298 to:

            str1 = "%s - %d bytes from %s: seq=%u" % (
                  time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime()),
                  len(rbuf),

...

since I want to know the exact time at which something goes down.

Thanks,

Sandip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions