Commit 13ee2353 authored by Guillaume Binet's avatar Guillaume Binet

moved global_restart out of plugin manager.

parent 50d0c891
......@@ -4,8 +4,7 @@ import signal
from datetime import datetime
from errbot import BotPlugin, botcmd, arg_botcmd
from errbot.plugin_manager import global_restart
from errbot.utils import format_timedelta
from errbot.utils import format_timedelta, global_restart
class Health(BotPlugin):
......
......@@ -156,12 +156,6 @@ def check_errbot_version(plugin_info: PluginInfo):
f'while Errbot is version {VERSION}')
# TODO: move this out, this has nothing to do with plugins
def global_restart():
python = sys.executable
os.execl(python, python, *sys.argv)
# Storage names
CONFIGS = 'configs'
BL_PLUGINS = 'bl_plugins'
......
......@@ -220,3 +220,9 @@ def collect_roots(base_paths, file_sig='*.plug'):
elif path_or_list is not None:
result |= find_roots(path_or_list, file_sig)
return result
def global_restart():
"""Restart the current process."""
python = sys.executable
os.execl(python, python, *sys.argv)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment