aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/optmanager.py
diff options
context:
space:
mode:
authorGrant Murphy <grant.murphy@elastic.co>2018-05-25 11:38:08 +1000
committerGrant Murphy <grant.murphy@elastic.co>2018-05-25 11:38:08 +1000
commitbd7069a9e09f8c07add66576b165095acce4dea5 (patch)
treeba83f0a464537d66e829796bef7126faa6cf45f8 /mitmproxy/optmanager.py
parentf910f361a07cc6d7efda280a698be1ac59cb1fa8 (diff)
downloadmitmproxy-bd7069a9e09f8c07add66576b165095acce4dea5.tar.gz
mitmproxy-bd7069a9e09f8c07add66576b165095acce4dea5.tar.bz2
mitmproxy-bd7069a9e09f8c07add66576b165095acce4dea5.zip
Adjust options when changed
The existing options for the console were not being updated when a new addon was added. This triggers the changed blinker signal when an option is added, and also recreates self.opts when this signal is received. Fixes #3147
Diffstat (limited to 'mitmproxy/optmanager.py')
-rw-r--r--mitmproxy/optmanager.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/mitmproxy/optmanager.py b/mitmproxy/optmanager.py
index a473e9df..2a4beba9 100644
--- a/mitmproxy/optmanager.py
+++ b/mitmproxy/optmanager.py
@@ -107,6 +107,7 @@ class OptManager:
choices: typing.Optional[typing.Sequence[str]] = None
) -> None:
self._options[name] = _Option(name, typespec, default, help, choices)
+ self.changed.send(self, updated={name})
@contextlib.contextmanager
def rollback(self, updated, reraise=False):