Commit efdd0759 authored by Eric S. Raymond's avatar Eric S. Raymond

Fix buggy interpretation of reposurgeon hint lines.

parent 5e0c4b85
......@@ -3133,9 +3133,9 @@ class StreamParser:
elif line.startswith(b"reposurgeon"):
# Extension command generated by some exporter's
# --reposurgeon mode.
fields = line.split().pop(0)
if fields[0] == "sourcetype" and len(fields) == 2:
self.repo.hint(fields[1], strong=True)
fields = line.split()
if fields[1] == "sourcetype" and len(fields) == 3:
self.repo.hint(fields[2], strong=True)
else:
# Simply pass through any line we don't understand.
self.repo.addEvent(Passthrough(line))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment