Fixes for get modules from json
This commit is contained in:
parent
1a77445a2c
commit
3015220a12
1 changed files with 10 additions and 3 deletions
|
|
@ -24,6 +24,10 @@ import os
|
||||||
import sys
|
import sys
|
||||||
import inspect
|
import inspect
|
||||||
from paramecio2.libraries.datetime import set_timezone
|
from paramecio2.libraries.datetime import set_timezone
|
||||||
|
try:
|
||||||
|
import ujson as json
|
||||||
|
except:
|
||||||
|
import json
|
||||||
|
|
||||||
swagger_app=False
|
swagger_app=False
|
||||||
|
|
||||||
|
|
@ -70,11 +74,14 @@ def start_app():
|
||||||
|
|
||||||
workdir=os.getcwd()
|
workdir=os.getcwd()
|
||||||
arr_module_path={}
|
arr_module_path={}
|
||||||
|
|
||||||
# Load blueprints from json file (for installed modules using paramecio2 utilities)
|
# Load blueprints from json file (for installed modules using paramecio2 utilities)
|
||||||
|
|
||||||
if os.path.isfile('config/modules.json'):
|
if os.path.isfile('./settings/modules.json'):
|
||||||
pass
|
|
||||||
|
with open('./settings/modules.json') as f:
|
||||||
|
json_apps=json.loads(f.read())
|
||||||
|
config.apps=json_apps | config.apps
|
||||||
|
|
||||||
for key_app, added_app in config.apps.items():
|
for key_app, added_app in config.apps.items():
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue