Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

waittime behavior #21

Closed
toddjames opened this issue Dec 10, 2016 · 2 comments
Closed

waittime behavior #21

toddjames opened this issue Dec 10, 2016 · 2 comments

Comments

@toddjames
Copy link

Thanks for all of the effort you've put into this library. It's the only one that I've found to be actively developed and work well.

There is a bug with respect to either the logic or exception message for waittime in the PingTransmitter class:

       if self.waittime <= 0:
            raise ValueError(
                "wait time must be greater than or equal to zero")

When waittime is set to 0, the exception is raised, which states that the

wait time must be greater than or equal to zero

According to the exception, 0 should be a valid value, but it isn't

More to the point, what prompted me to start digging into this is that I was looking for a way to exclude the use of the -w flag on Linux altogether. I want ping to return as soon as it's done.

As a feature request in addition to the bug above, it would be very helpful to be able to set waittime to 0 and have the -w flag not be passed to ping.

@thombashi
Copy link
Owner

Thank you for the report.

You are correct.

wait time must be greater than or equal to zero

This error message is incorrect, correctly it should be

wait time must be greater than zero

I've fixed the error message.

As a feature request in addition to the bug above, it would be very helpful to be able to set waittime to 0 and have the -w flag not be passed to ping.

And I add capability to ignore waittime by setting None with pingparsing 0.4.0.

@toddjames toddjames changed the title wattime behavior waittime behavior Dec 11, 2016
@toddjames
Copy link
Author

Works perfectly, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants