From bb7e4b853cb90352f59420f608b15b903fe8cc9a Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Tue, 27 Feb 2018 09:33:14 +1300 Subject: [PATCH] script.run takes a path argument This must have slipped through in the first conversion. --- mitmproxy/addons/script.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mitmproxy/addons/script.py b/mitmproxy/addons/script.py index dcad943af1..6f0d1e28ea 100644 --- a/mitmproxy/addons/script.py +++ b/mitmproxy/addons/script.py @@ -12,6 +12,7 @@ from mitmproxy import command from mitmproxy import eventsequence from mitmproxy import ctx +import mitmproxy.types as mtypes def load_script(path: str) -> types.ModuleType: @@ -110,7 +111,7 @@ def running(self): self.is_running = True @command.command("script.run") - def script_run(self, flows: typing.Sequence[flow.Flow], path: str) -> None: + def script_run(self, flows: typing.Sequence[flow.Flow], path: mtypes.Path) -> None: """ Run a script on the specified flows. The script is loaded with default options, and all lifecycle events for each flow are