refactor: move implementation to static def

This commit is contained in:
Swann
2021-03-26 12:30:15 +01:00
parent e3af69a9c8
commit e659b7da94
28 changed files with 534 additions and 537 deletions

View File

@ -41,7 +41,7 @@ import bpy
from bpy.app.handlers import persistent
from . import environment
from uuid import uuid4
LIBS = os.path.dirname(os.path.abspath(__file__))+"/libs/replication"
module_error_msg = "Insufficient rights to install the multi-user \
@ -53,10 +53,11 @@ def register():
datefmt='%H:%M:%S',
level=logging.INFO)
for module_name in list(sys.modules.keys()):
if 'replication' in module_name:
del sys.modules[module_name]
if LIBS in sys.path:
logging.debug('Third party module already added')
else:
if LIBS not in sys.path:
logging.info('Adding local modules dir to the path')
sys.path.insert(0, LIBS)