Commit aff889f3 authored by Nicolas Ledez's avatar Nicolas Ledez Committed by Benjamin Bouvier
Browse files

Allow to configure weboob python path from an env variable;

parent 0999cdd8
......@@ -23,7 +23,8 @@ function callWeboob(command, access) {
log.info(`Calling weboob: command ${command}...`);
let serverRoot = path.join(__filename, '..', '..', '..');
let script = spawn(`./weboob/main.py`, [], { cwd: serverRoot });
let env = { WEBOOB_PYTHON_PATH: process.env.WEBOOB_PYTHON_PATH };
let script = spawn(`./weboob/main.py`, [], { cwd: serverRoot, env });
script.stdin.write(`${command}\n`);
......
#!/usr/bin/env python2
import os
WEBOOB_PYTHON_PATH = os.environ['WEBOOB_PYTHON_PATH']
if os.path.isdir(WEBOOB_PYTHON_PATH):
import sys
sys.path.append(WEBOOB_PYTHON_PATH)
from weboob.core import Weboob
from weboob.core.modules import ModuleLoadError
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment