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

fix wrong destination domain suffix with '.net' #40

Merged
merged 1 commit into from Mar 27, 2021

Conversation

xNathan
Copy link
Contributor

@xNathan xNathan commented Feb 6, 2021

Issue: pingparsing doesn't handle destination parsing with '.net' domain correctly

Result and steps to appear:

$ pingparsing example.net
{
    "example.net": {
        "destination": "example.ne",
        "packet_transmit": 10,
        "packet_receive": 10,
        "packet_loss_count": 0,
        "packet_loss_rate": 0.0,
        "rtt_min": 189.275,
        "rtt_avg": 266.611,
        "rtt_max": 327.308,
        "rtt_mdev": 42.726,
        "packet_duplicate_count": 0,
        "packet_duplicate_rate": 0.0
    }
}

Expected result:

-        "destination": "example.ne",
+        "destination": "example.net",

The reason is that strip() in Python will remove all characters in function argument.

_parse_destination function tries to remove ping statistics ---, but it removes t in .net, which is not expected.

Add a quick fix for that issue, hope it helps, thanks.

@thombashi thombashi merged commit 3609bce into thombashi:master Mar 27, 2021
@thombashi
Copy link
Owner

Thank you for your pull request.

@xNathan xNathan deleted the fix/destination branch March 30, 2021 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants