diff options
author | Grant Murphy <grant.murphy@elastic.co> | 2018-05-25 11:38:08 +1000 |
---|---|---|
committer | Grant Murphy <grant.murphy@elastic.co> | 2018-05-25 11:38:08 +1000 |
commit | bd7069a9e09f8c07add66576b165095acce4dea5 (patch) | |
tree | ba83f0a464537d66e829796bef7126faa6cf45f8 /mitmproxy/optmanager.py | |
parent | f910f361a07cc6d7efda280a698be1ac59cb1fa8 (diff) | |
download | mitmproxy-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.py | 1 |
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): |