From 3bcbc0ffacc9ee107ada5a48a89167b984cd15d6 Mon Sep 17 00:00:00 2001 From: ahrenholz Date: Tue, 22 Jul 2014 17:17:42 +0000 Subject: [PATCH] make daemon shutdown more robust to Python errors (Boeing r1855) --- daemon/core/session.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/daemon/core/session.py b/daemon/core/session.py index f29f10b8..f767c018 100644 --- a/daemon/core/session.py +++ b/daemon/core/session.py @@ -120,9 +120,12 @@ class Session(object): def shutdown(self): ''' Shut down all emulation objects and remove the session directory. ''' - self.emane.shutdown() - self.broker.shutdown() - self.sdt.shutdown() + if hasattr(self, 'emane'): + self.emane.shutdown() + if hasattr(self, 'broker'): + self.broker.shutdown() + if hasattr(self, 'sdt'): + self.sdt.shutdown() self.delobjs() preserve = False if hasattr(self.options, 'preservedir'):