From c173a68f5e2ebc4037ea0abddfe0ef9c8fead325 Mon Sep 17 00:00:00 2001 From: Difrex Date: Tue, 9 Aug 2016 15:40:07 +0300 Subject: [PATCH] OS environment for app conf --- surok.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/surok.py b/surok.py index 47eb8e8..f7657b9 100755 --- a/surok.py +++ b/surok.py @@ -1,6 +1,7 @@ #!/usr/bin/python3 from time import sleep +import os from os import listdir from os.path import isfile, join import json @@ -38,10 +39,13 @@ def get_configs(): # Get Surok App configuration # Read app conf from file and return dict def load_app_conf(app): + # Load OS environment to app_conf f = open(conf['confd'] + '/' + app) c = json.loads(f.read()) f.close() + c['env'] = os.environ + return c