forked from platypush/platypush
Support for environment variables passed through main config
This commit is contained in:
parent
3af30075e3
commit
2f1cea99fa
1 changed files with 4 additions and 1 deletions
|
@ -3,7 +3,6 @@ import logging
|
|||
import os
|
||||
import socket
|
||||
import sys
|
||||
import time
|
||||
import yaml
|
||||
|
||||
from platypush.utils import get_hash
|
||||
|
@ -105,6 +104,10 @@ class Config(object):
|
|||
if 'device_id' not in self._config:
|
||||
self._config['device_id'] = socket.gethostname()
|
||||
|
||||
if 'environment' in self._config:
|
||||
for k,v in self._config['environment']:
|
||||
os.environ[k] = v
|
||||
|
||||
self.backends = {}
|
||||
self.plugins = {}
|
||||
self.event_hooks = {}
|
||||
|
|
Loading…
Reference in a new issue