diff options
author | Aldo Cortesi <aldo@corte.si> | 2018-06-16 10:59:24 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@corte.si> | 2018-06-16 10:59:24 +1200 |
commit | f5a6499b15df194c5d3e96fa22d010d534b42b1e (patch) | |
tree | ac7d059d351fa1ccccee5ea76e811d2cd5089750 | |
parent | 85526e5370e32a93b7086648ece12c3bd5269db8 (diff) | |
download | mitmproxy-f5a6499b15df194c5d3e96fa22d010d534b42b1e.tar.gz mitmproxy-f5a6499b15df194c5d3e96fa22d010d534b42b1e.tar.bz2 mitmproxy-f5a6499b15df194c5d3e96fa22d010d534b42b1e.zip |
Simpler addon clear mechanism
This should improve test robustness
-rw-r--r-- | mitmproxy/addonmanager.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mitmproxy/addonmanager.py b/mitmproxy/addonmanager.py index 0b559293..645f3a93 100644 --- a/mitmproxy/addonmanager.py +++ b/mitmproxy/addonmanager.py @@ -123,9 +123,10 @@ class AddonManager: """ Remove all addons. """ - for i in self.chain: - self.remove(i) + for a in self.chain: + self.invoke_addon(a, "done") self.lookup = {} + self.chain = [] def get(self, name): """ |