Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
EOLE
Zéphir
Services
SaltMaster manager
Commits
5db19ff0
Commit
5db19ff0
authored
Feb 06, 2019
by
Matthieu Lamalle
Browse files
correction in function zephir.environment
parent
63d90c4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
environment/zephir.py
View file @
5db19ff0
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment