From 7f8a83393300f24a6c459f1299295d6104350c28 Mon Sep 17 00:00:00 2001 From: Jdrezen <jeremie.drezen@gmail.com> Date: Tue, 11 May 2021 16:07:40 +0200 Subject: [PATCH] Ajout dans try-catch dans le cas de fermeture en plein milieu d'un cycle --- philosopher_example/philosophersAmasExample.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/philosopher_example/philosophersAmasExample.py b/philosopher_example/philosophersAmasExample.py index 83fee56..513b8e3 100644 --- a/philosopher_example/philosophersAmasExample.py +++ b/philosopher_example/philosophersAmasExample.py @@ -35,4 +35,7 @@ class PhilosophersAmasExamples(Amas): self.__observer = observer def on_cycle_end(self): - self.__observer.updateCycle(self.get_environment(), self) + try: + self.__observer.updateCycle(self.get_environment(), self) + except: + print('trql trql') -- GitLab