aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/console/options.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@corte.si>2016-07-15 16:48:01 +1200
committerGitHub <noreply@github.com>2016-07-15 16:48:01 +1200
commit64e16f5112669a31f86183be640eeee3a47c2961 (patch)
tree2e8ecc38f022c2b302d5ce67fd282dab45941fd9 /mitmproxy/console/options.py
parente051928f26afbc58c01d7854b62f8bfb0d4ed5ee (diff)
parentc7d0850d8f697915b183f4fafd5ede7df2245569 (diff)
downloadmitmproxy-64e16f5112669a31f86183be640eeee3a47c2961.tar.gz
mitmproxy-64e16f5112669a31f86183be640eeee3a47c2961.tar.bz2
mitmproxy-64e16f5112669a31f86183be640eeee3a47c2961.zip
Merge pull request #1356 from cortesi/script
Scripts to addon
Diffstat (limited to 'mitmproxy/console/options.py')
-rw-r--r--mitmproxy/console/options.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/mitmproxy/console/options.py b/mitmproxy/console/options.py
index d363ba74..d8824b05 100644
--- a/mitmproxy/console/options.py
+++ b/mitmproxy/console/options.py
@@ -54,7 +54,7 @@ class Options(urwid.WidgetWrap):
select.Option(
"Scripts",
"S",
- lambda: master.scripts,
+ lambda: master.options.scripts,
self.scripts
),
@@ -160,12 +160,14 @@ class Options(urwid.WidgetWrap):
self.master.replacehooks.clear()
self.master.set_ignore_filter([])
self.master.set_tcp_filter([])
- self.master.scripts = []
- self.master.options.anticache = False
- self.master.options.anticomp = False
- self.master.options.stickyauth = None
- self.master.options.stickycookie = None
+ self.master.options.update(
+ scripts = [],
+ anticache = False,
+ anticomp = False,
+ stickyauth = None,
+ stickycookie = None
+ )
self.master.state.default_body_view = contentviews.get("Auto")
@@ -234,7 +236,7 @@ class Options(urwid.WidgetWrap):
self.master.view_grideditor(
grideditor.ScriptEditor(
self.master,
- [[i.command] for i in self.master.scripts],
+ [[i] for i in self.master.options.scripts],
self.master.edit_scripts
)
)