diff options
author | Aldo Cortesi <aldo@corte.si> | 2018-02-27 10:14:33 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-27 10:14:33 +1300 |
commit | 90166084866952c578b2dd81a0aa19ed516a619e (patch) | |
tree | c41e50a37383813ab29b5a719f1f2b7b0d825e97 | |
parent | 1295856cd5d1f2e868dd62b9a05a52bdab0fcbb2 (diff) | |
parent | bb7e4b853cb90352f59420f608b15b903fe8cc9a (diff) | |
download | mitmproxy-90166084866952c578b2dd81a0aa19ed516a619e.tar.gz mitmproxy-90166084866952c578b2dd81a0aa19ed516a619e.tar.bz2 mitmproxy-90166084866952c578b2dd81a0aa19ed516a619e.zip |
Merge pull request #2931 from cortesi/scriptpath
script.run takes a path argument
-rw-r--r-- | mitmproxy/addons/script.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mitmproxy/addons/script.py b/mitmproxy/addons/script.py index dcad943a..6f0d1e28 100644 --- a/mitmproxy/addons/script.py +++ b/mitmproxy/addons/script.py @@ -12,6 +12,7 @@ from mitmproxy import flow 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 @@ class ScriptLoader: 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 |