Quit plugins on exit

Plugins should have a chance to clean up after themselves when we are
shutting down.
This commit is contained in:
Bryan Schumaker 2010-11-13 21:38:16 -05:00
parent eae86f2dae
commit 53908f3b1e
2 changed files with 10 additions and 0 deletions

View File

@ -65,4 +65,6 @@ def startup():
def shutdown():
event.start("PREQUIT")
import plugin
plugin.quit()
event.start("POSTQUIT")

View File

@ -22,6 +22,14 @@ def init():
if p_dir == None:
p_dir = path.plugin_dir()
def quit():
global loaded
for mod in loaded:
try:
loaded[mod].stop()
except:
pass
def install_once(filepath):
global install