diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2017-04-26 07:13:36 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@corte.si> | 2017-04-26 09:01:40 +1200 |
commit | 7aa208189477f8c5fcd3f7850e1c98fade757f11 (patch) | |
tree | a154ea6b2fca6412df3f7d63eaa40e9b3ce7456f /mitmproxy/addonmanager.py | |
parent | e6eeab60946e61047ed858422badbda189a6f9e8 (diff) | |
download | mitmproxy-7aa208189477f8c5fcd3f7850e1c98fade757f11.tar.gz mitmproxy-7aa208189477f8c5fcd3f7850e1c98fade757f11.tar.bz2 mitmproxy-7aa208189477f8c5fcd3f7850e1c98fade757f11.zip |
Remove watchdog, solidify script testing
- Remove the watchdog dependency. We now just stat the script file every 2
seconds to check for an updated mtime.
- Further solidify our script testing, and in particular make the example tests
nicer. These should exemplify how we want users to test their own addon
scripts. More work on addon testing to follow.
Diffstat (limited to 'mitmproxy/addonmanager.py')
-rw-r--r-- | mitmproxy/addonmanager.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mitmproxy/addonmanager.py b/mitmproxy/addonmanager.py index b6d7adb6..e763d914 100644 --- a/mitmproxy/addonmanager.py +++ b/mitmproxy/addonmanager.py @@ -129,9 +129,13 @@ class AddonManager: def register(self, addon): """ - Register an addon and all its sub-addons with the manager without - adding it to the chain. This should be used by addons that - dynamically manage addons. Must be called within a current context. + Register an addon, call its load event, and then register all its + sub-addons. This should be used by addons that dynamically manage + addons. + + If the calling addon is already running, it should follow with + running and configure events. Must be called within a current + context. """ for a in traverse([addon]): name = _get_name(a) |