Parallel ping problems python puzzler

amaccormack at gmail.com amaccormack at gmail.com
Mon Apr 2 12:11:22 EDT 2007


On 2 Apr, 15:03, "Miki" <miki.teb... at gmail.com> wrote:
> Hello,
>
> >    def run(self):
> >       # -w 1 option topingmakes ittimeoutafter 1 second
> >       pingcmd="/bin/ping-c 2 -q -i 0.3 -w 1 %s >/dev/null" % ip
>
> Not sure, but "ip" should be "self.ip", this might cause theproblem.

Sorry, that was my bad cutting-and-pasting to make a shorter example,
it IS self.ip in the real code. The REAL code works fine parallel or
serial as long as everything responds to the ping, but as soon as any
devices do not respond, it hangs in the threaded version.




More information about the Python-list mailing list