Skip to content

Commit e89b8bf

Browse files
committed
corrections
1 parent 0e72949 commit e89b8bf

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/bin/lifecycle.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ def main():
3636

3737
try:
3838
data = json.loads(content)
39-
before = u.find_key(data, 'before.lifecycle')
40-
after = u.find_key(data, 'after.lifecycle')
39+
before = data['payload']['before']['lifecycle']
40+
after = data['payload']['after']['lifecycle']
4141
specific_name = before + '_' + after if before and after else None
4242
except (json.JSONDecodeError, Exception):
4343
specific_name = None

src/lifecycle/lifecycle.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
#!/usr/bin/python3
2-
2+
#Exemple de script lifecycle
33
import sys
4-
4+
# Import librairie
55
sys.path.append('../lib')
66
import backend_utils as u
77

88

99

1010

1111
def main():
12+
# lecture json sur l'entree standart
1213
content=u.readjsoninput()
14+
#retour de l'execution au daemon
1315
return print(u.returncode(0,'lifecycle.py'))
1416

1517
if __name__ == '__main__':

0 commit comments

Comments
 (0)