Skip to content

Error/filtered packet not handle by pingparser #6

Description

@julowe

Having an error (in this case a filtered packet) causes pingparser to raise an exception. This may be a known issue or a feature. See code below

Traceback (most recent call last):
  File "./checkSat.py", line 32, in <module>
    ping_results = pingparser.parse(cmd_output)
  File "/usr/local/lib/python2.7/dist-packages/pingparser-0.4-py2.7.egg/pingparser.py", line 77, in parse
    sent, received, packet_loss = _get_match_groups(ping_output, rslt_matcher)
  File "/usr/local/lib/python2.7/dist-packages/pingparser-0.4-py2.7.egg/pingparser.py", line 55, in _get_match_groups
    raise Exception('Invalid PING output:\n' + ping_output)
Exception: Invalid PING output:
PING 10.1.60.1 (10.1.60.1) 56(84) bytes of data.
From x.x.x.x icmp_seq=7 Packet filtered

--- 10.1.60.1 ping statistics ---
7 packets transmitted, 0 received, +1 errors, 100% packet loss, time 6035ms

Activity

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

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