Commit 5db19ff0 authored by Matthieu Lamalle's avatar Matthieu Lamalle
Browse files

correction in function zephir.environment

parent 63d90c4f
......@@ -8,12 +8,12 @@ EOSFUNC_PATH = '/var/lib/eole/zephir/config.creolefuncs'
def environment():
grains = {}
eosfunc = imp.load_source('eosfunc', EOSFUNC_PATH)
with open(FILE_PATH, "r") as fhr:
probes = load(fhr)
eosfunc = imp.load_source('eosfunc', EOSFUNC_PATH)
if isfile(FILE_PATH):
for name, probe in probes.items():
grains[name] = getattr(eosfunc, probe["function"])(*probe["args"], **probe["kwargs"])
with open(FILE_PATH, "r") as fhr:
probes = load(fhr)
for name, probe in probes.items():
grains[name] = getattr(eosfunc, probe["function"])(*probe["args"], **probe["kwargs"])
return grains
Markdown is supported
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