make daemon shutdown more robust to Python errors

(Boeing r1855)
This commit is contained in:
ahrenholz 2014-07-22 17:17:42 +00:00
parent c95e240aa8
commit 3bcbc0ffac

View file

@ -120,9 +120,12 @@ class Session(object):
def shutdown(self): def shutdown(self):
''' Shut down all emulation objects and remove the session directory. ''' Shut down all emulation objects and remove the session directory.
''' '''
self.emane.shutdown() if hasattr(self, 'emane'):
self.broker.shutdown() self.emane.shutdown()
self.sdt.shutdown() if hasattr(self, 'broker'):
self.broker.shutdown()
if hasattr(self, 'sdt'):
self.sdt.shutdown()
self.delobjs() self.delobjs()
preserve = False preserve = False
if hasattr(self.options, 'preservedir'): if hasattr(self.options, 'preservedir'):