From e423bfbbcc1a70ce524f64b4a9c14f8044ea0baa Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Mon, 28 Dec 2020 22:54:38 +0100 Subject: [PATCH] make mypy happy --- mitmproxy/addons/cut.py | 4 ++-- mitmproxy/contrib/kaitaistruct/__init__.py | 0 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 mitmproxy/contrib/kaitaistruct/__init__.py diff --git a/mitmproxy/addons/cut.py b/mitmproxy/addons/cut.py index 4fcea3427..c75c14ca7 100644 --- a/mitmproxy/addons/cut.py +++ b/mitmproxy/addons/cut.py @@ -107,8 +107,8 @@ class Cut: fp.write(v.encode("utf8")) ctx.log.alert("Saved single cut.") else: - with open(path, "a" if append else "w", newline='', encoding="utf8") as fp: - writer = csv.writer(fp) + with open(path, "a" if append else "w", newline='', encoding="utf8") as tfp: + writer = csv.writer(tfp) for f in flows: vals = [extract(c, f) for c in cuts] writer.writerow( diff --git a/mitmproxy/contrib/kaitaistruct/__init__.py b/mitmproxy/contrib/kaitaistruct/__init__.py new file mode 100644 index 000000000..e69de29bb