Closed hrishikeshathalye closed 2 years ago
parse_raw in class DitgRunner throws a KeyError when using DITG to generate VoIP traffic.
Printing the parts dictionary reveals the reason to be incorrect parsing of the DITG output.
Changing the regex parts = re.split(r">?\s*", line) to parts = list(filter(None, re.split(r"(\S+)>\s*", line))) can fix the issue.
parts = re.split(r">?\s*", line)
parts = list(filter(None, re.split(r"(\S+)>\s*", line)))
Can submit a PR if needed.
Please do! :)
parse_raw in class DitgRunner throws a KeyError when using DITG to generate VoIP traffic.
Printing the parts dictionary reveals the reason to be incorrect parsing of the DITG output.
Changing the regex
parts = re.split(r">?\s*", line)
toparts = list(filter(None, re.split(r"(\S+)>\s*", line)))
can fix the issue.Can submit a PR if needed.