diff options
author | Aldo Cortesi <aldo@corte.si> | 2018-05-08 11:09:10 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@corte.si> | 2018-05-08 11:09:10 +1200 |
commit | 76a7883c8b7651e7078ba351ea4675bb0bd0f3db (patch) | |
tree | 352cdb3e32daa1110c468e2cf35145a5309a96aa /examples | |
parent | 1b0eed19d1429b291349bcd92c19bb6f41cf867a (diff) | |
download | mitmproxy-76a7883c8b7651e7078ba351ea4675bb0bd0f3db.tar.gz mitmproxy-76a7883c8b7651e7078ba351ea4675bb0bd0f3db.tar.bz2 mitmproxy-76a7883c8b7651e7078ba351ea4675bb0bd0f3db.zip |
events: document behaviour of done() more fully
Diffstat (limited to 'examples')
-rw-r--r-- | examples/addons/events.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/addons/events.py b/examples/addons/events.py index cd714ba0..f83c8f11 100644 --- a/examples/addons/events.py +++ b/examples/addons/events.py @@ -142,8 +142,12 @@ class Events: def done(self): """ - Called when the addon shuts down, either by being removed from the - mitmproxy instance, or when mitmproxy itself shuts down. + Called when the addon shuts down, either by being removed from + the mitmproxy instance, or when mitmproxy itself shuts down. On + shutdown, this event is called after the event loop is + terminated, guaranteeing that it will be the final event an addon + sees. Note that log handlers are shut down at this point, so + calls to log functions will produce no output. """ def load(self, entry: mitmproxy.addonmanager.Loader): |