make daemon shutdown more robust to Python errors

(Boeing r1855)
This commit is contained in:
ahrenholz@gmail.com 2014-07-22 17:17:42 +00:00
parent d8355ecd54
commit 8e17f1edb8

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'):