diff options
author | Aldo Cortesi <aldo@corte.si> | 2017-04-26 10:25:56 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@corte.si> | 2017-04-26 10:25:56 +1200 |
commit | f90b4c2ff0f3fd71350900c10dea2a67846e1bdb (patch) | |
tree | 9209f40200ad73b7b2346d0b2286c8aa26f0d886 /mitmproxy/master.py | |
parent | 7aa208189477f8c5fcd3f7850e1c98fade757f11 (diff) | |
download | mitmproxy-f90b4c2ff0f3fd71350900c10dea2a67846e1bdb.tar.gz mitmproxy-f90b4c2ff0f3fd71350900c10dea2a67846e1bdb.tar.bz2 mitmproxy-f90b4c2ff0f3fd71350900c10dea2a67846e1bdb.zip |
Move options into ctx
Many addons currently save options on configure(), either as individual options
or sometimes by saving the entire options object. The current options should
simply be available on the ctx object, simplifying state management for addons
considerably.
Diffstat (limited to 'mitmproxy/master.py')
-rw-r--r-- | mitmproxy/master.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mitmproxy/master.py b/mitmproxy/master.py index 46fdb585..94900915 100644 --- a/mitmproxy/master.py +++ b/mitmproxy/master.py @@ -50,11 +50,13 @@ class Master: return mitmproxy_ctx.master = self mitmproxy_ctx.log = log.Log(self) + mitmproxy_ctx.options = self.options try: yield finally: mitmproxy_ctx.master = None mitmproxy_ctx.log = None + mitmproxy_ctx.options = None def tell(self, mtype, m): m.reply = controller.DummyReply() |