Allow sources to import from sources folder

This commit is contained in:
Tim Van Baak 2019-12-20 15:10:57 -08:00
parent 61a9761b8c
commit 7c03565242
1 changed files with 2 additions and 0 deletions

View File

@ -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)