From 8e17f1edb81d7f0ff5704f8d190ee49e2827ef83 Mon Sep 17 00:00:00 2001 From: "ahrenholz@gmail.com" Date: Tue, 22 Jul 2014 17:17:42 +0000 Subject: [PATCH] make daemon shutdown more robust to Python errors (Boeing r1855) --- trunk/daemon/core/session.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/trunk/daemon/core/session.py b/trunk/daemon/core/session.py index f29f10b8..f767c018 100644 --- a/trunk/daemon/core/session.py +++ b/trunk/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'):