diff options
author | Maximilian Hils <git@maximilianhils.com> | 2017-07-31 00:01:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-31 00:01:15 +0200 |
commit | 018668618e26723b66a7878d7892403043d8ccc6 (patch) | |
tree | dae3a55a04f3b1282eed9f046fd20e5f29107a9d /mitmproxy/tools/web/master.py | |
parent | f844c68e2ec6b9daedc376f75ae0a4e09a4ac22c (diff) | |
parent | 826513ef278739b51d4d25eefef0ab6217df74ab (diff) | |
download | mitmproxy-018668618e26723b66a7878d7892403043d8ccc6.tar.gz mitmproxy-018668618e26723b66a7878d7892403043d8ccc6.tar.bz2 mitmproxy-018668618e26723b66a7878d7892403043d8ccc6.zip |
Merge pull request #2484 from mhils/options-into-own-addon
Enable tool-specific options
Diffstat (limited to 'mitmproxy/tools/web/master.py')
-rw-r--r-- | mitmproxy/tools/web/master.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/mitmproxy/tools/web/master.py b/mitmproxy/tools/web/master.py index dc5b2627..b13aeff9 100644 --- a/mitmproxy/tools/web/master.py +++ b/mitmproxy/tools/web/master.py @@ -13,12 +13,12 @@ from mitmproxy.addons import termlog from mitmproxy.addons import view from mitmproxy.addons import termstatus from mitmproxy.options import Options # noqa -from mitmproxy.tools.web import app +from mitmproxy.tools.web import app, webaddons class WebMaster(master.Master): - def __init__(self, options, server, with_termlog=True): - super().__init__(options, server) + def __init__(self, options, with_termlog=True): + super().__init__(options) self.view = view.View() self.view.sig_view_add.connect(self._sig_view_add) self.view.sig_view_remove.connect(self._sig_view_remove) @@ -34,6 +34,7 @@ class WebMaster(master.Master): self.addons.add(*addons.default_addons()) self.addons.add( + webaddons.WebAddon(), intercept.Intercept(), readfile.ReadFile(), self.view, @@ -44,8 +45,6 @@ class WebMaster(master.Master): self.app = app.Application( self, self.options.web_debug ) - # This line is just for type hinting - self.options = self.options # type: Options def _sig_view_add(self, view, flow): app.ClientConnection.broadcast( |