diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2016-07-13 23:45:49 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2016-07-13 23:45:49 +1200 |
commit | 255e1eb00b76f169305d7c4ae3bba91403f3f924 (patch) | |
tree | c71a9a1ddf4a373a8a0c796c78a2aefecf111ea4 /mitmproxy/console/options.py | |
parent | 1f72532caeb38207207b6b2310ca9ca3b8b9c512 (diff) | |
download | mitmproxy-255e1eb00b76f169305d7c4ae3bba91403f3f924.tar.gz mitmproxy-255e1eb00b76f169305d7c4ae3bba91403f3f924.tar.bz2 mitmproxy-255e1eb00b76f169305d7c4ae3bba91403f3f924.zip |
Add the addons mechanism
Demonstrate how it works and interacts with Options by adding our first new
builtin: anticomp.
Diffstat (limited to 'mitmproxy/console/options.py')
-rw-r--r-- | mitmproxy/console/options.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mitmproxy/console/options.py b/mitmproxy/console/options.py index 6a4b8dd6..db6d405a 100644 --- a/mitmproxy/console/options.py +++ b/mitmproxy/console/options.py @@ -102,7 +102,7 @@ class Options(urwid.WidgetWrap): select.Option( "Anti-Compression", "o", - lambda: master.anticomp, + lambda: master.options.anticomp, self.toggle_anticomp ), select.Option( @@ -177,7 +177,7 @@ class Options(urwid.WidgetWrap): self.master.anticache = not self.master.anticache def toggle_anticomp(self): - self.master.anticomp = not self.master.anticomp + self.master.options.anticomp = not self.master.options.anticomp def toggle_killextra(self): self.master.killextra = not self.master.killextra |