Add the ability to reload submodule or a module part after a import reload (useful for reload imports of this module)
This commit is contained in:
parent
d37aeeda4c
commit
b4b24c4543
6 changed files with 29 additions and 10 deletions
|
|
@ -1,5 +1,6 @@
|
|||
# coding=utf-8
|
||||
|
||||
import imp
|
||||
import re
|
||||
import sys
|
||||
from datetime import timedelta
|
||||
|
|
@ -7,10 +8,10 @@ from datetime import datetime
|
|||
import time
|
||||
import threading
|
||||
|
||||
from module_state import ModuleState
|
||||
|
||||
nemubotversion = 3.0
|
||||
|
||||
from module_state import ModuleState
|
||||
|
||||
from . import Manager
|
||||
|
||||
def help_tiny ():
|
||||
|
|
@ -32,6 +33,9 @@ def load():
|
|||
threadManager = Manager.Manager(DATAS, SRVS)
|
||||
threadManager.start()
|
||||
|
||||
def reload():
|
||||
imp.reload(Manager)
|
||||
|
||||
def close():
|
||||
global threadManager
|
||||
if threadManager is not None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue