aboutsummaryrefslogtreecommitdiffstats
path: root/test/tools/inspect_dumpfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/tools/inspect_dumpfile.py')
-rw-r--r--test/tools/inspect_dumpfile.py33
1 files changed, 0 insertions, 33 deletions
diff --git a/test/tools/inspect_dumpfile.py b/test/tools/inspect_dumpfile.py
deleted file mode 100644
index d15e9e8a..00000000
--- a/test/tools/inspect_dumpfile.py
+++ /dev/null
@@ -1,33 +0,0 @@
-from pprint import pprint
-
-import click
-
-from libmproxy import tnetstring
-
-
-def read_tnetstring(input):
- # tnetstring throw a ValueError on EOF, which is hard to catch
- # because they raise ValueErrors for a couple of other reasons.
- # Check for EOF to avoid this.
- if not input.read(1):
- return None
- else:
- input.seek(-1, 1)
- return tnetstring.load(input)
-
-
-@click.command()
-@click.argument("input", type=click.File('rb'))
-def inspect(input):
- """
- pretty-print a dumpfile
- """
- while True:
- data = read_tnetstring(input)
- if not data:
- break
- pprint(data)
-
-
-if __name__ == "__main__":
- inspect()