Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Maxime Buquet
poezio
Commits
eb2e5825
Commit
eb2e5825
authored
Mar 10, 2013
by
mathieui
Browse files
Disable plugins on exit
parent
f0fb3d5d
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/core.py
View file @
eb2e5825
...
...
@@ -2230,6 +2230,7 @@ class Core(object):
msg
=
arg
else
:
msg
=
None
self
.
plugin_manager
.
disable_plugins
()
self
.
disconnect
(
msg
)
self
.
running
=
False
self
.
reset_curses
()
...
...
src/plugin_manager.py
View file @
eb2e5825
...
...
@@ -67,6 +67,13 @@ class PluginManager(object):
self
.
roster_elements
=
{}
self
.
plugin_api
=
PluginAPI
(
core
,
self
)
def
disable_plugins
(
self
):
for
plugin
in
set
(
self
.
plugins
.
keys
()):
try
:
self
.
unload
(
plugin
)
except
:
pass
def
load
(
self
,
name
,
notify
=
True
):
"""
Load a plugin.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment