Allow sources to import from sources folder
This commit is contained in:
parent
61a9761b8c
commit
7c03565242
|
@ -2,6 +2,7 @@ import os
|
||||||
import traceback
|
import traceback
|
||||||
import importlib.util
|
import importlib.util
|
||||||
import json
|
import json
|
||||||
|
import sys
|
||||||
|
|
||||||
import error
|
import error
|
||||||
from configs import SOURCES_PATH, DUNGEON_PATH, logger
|
from configs import SOURCES_PATH, DUNGEON_PATH, logger
|
||||||
|
@ -9,6 +10,7 @@ import loader
|
||||||
import timestamp
|
import timestamp
|
||||||
|
|
||||||
def update_sources(*source_names):
|
def update_sources(*source_names):
|
||||||
|
sys.path.append(SOURCES_PATH)
|
||||||
for source_name in source_names:
|
for source_name in source_names:
|
||||||
try:
|
try:
|
||||||
source_module = load_source(source_name)
|
source_module = load_source(source_name)
|
||||||
|
|
Loading…
Reference in New Issue