aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/test/taddons.py
diff options
context:
space:
mode:
Diffstat (limited to 'mitmproxy/test/taddons.py')
-rw-r--r--mitmproxy/test/taddons.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mitmproxy/test/taddons.py b/mitmproxy/test/taddons.py
index c3e19cc7..8d6baa12 100644
--- a/mitmproxy/test/taddons.py
+++ b/mitmproxy/test/taddons.py
@@ -61,5 +61,6 @@ class context:
Options object with the given keyword arguments, then calls the
configure method on the addon with the updated value.
"""
- self.options.update(**kwargs)
- addon.configure(self.options, kwargs.keys())
+ with self.options.rollback(kwargs.keys(), reraise=True):
+ self.options.update(**kwargs)
+ addon.configure(self.options, kwargs.keys())