From 9a57e4a728571ff2f5942ecbc9e116da4099c7c8 Mon Sep 17 00:00:00 2001 From: thatmattlove Date: Fri, 17 Sep 2021 01:12:42 -0700 Subject: [PATCH] Remove old parser --- hyperglass/parsing/common.py | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 hyperglass/parsing/common.py diff --git a/hyperglass/parsing/common.py b/hyperglass/parsing/common.py deleted file mode 100644 index 252f47b..0000000 --- a/hyperglass/parsing/common.py +++ /dev/null @@ -1,17 +0,0 @@ -"""Command parsers applied to all unstructured output.""" - - -def remove_command(commands: str, output: str) -> str: - """Remove anything before the command if found in output.""" - _output = output.strip().split("\n") - - for command in commands: - for line in _output: - if command in line: - idx = _output.index(line) + 1 - _output = _output[idx:] - - return "\n".join(_output) - - -parsers = (remove_command,)