events: document behaviour of done() more fully

This commit is contained in:
Aldo Cortesi 2018-05-08 11:09:10 +12:00
parent 1b0eed19d1
commit 76a7883c8b

View File

@ -142,8 +142,12 @@ class Events:
def done(self): def done(self):
""" """
Called when the addon shuts down, either by being removed from the Called when the addon shuts down, either by being removed from
mitmproxy instance, or when mitmproxy itself shuts down. 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): def load(self, entry: mitmproxy.addonmanager.Loader):