refactor: move implementation to static def
This commit is contained in:
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user