Skip to content

Commit

Permalink
Merge pull request mitmproxy#2931 from cortesi/scriptpath
Browse files Browse the repository at this point in the history
script.run takes a path argument
  • Loading branch information
cortesi authored Feb 26, 2018
2 parents 1295856 + bb7e4b8 commit 9016608
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mitmproxy/addons/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9016608

Please sign in to comment.