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