Bug 965782 - ignore certain delete_session exceptions in Marionette cleanup, r=wlach

This commit is contained in:
Malini Das 2014-01-30 15:14:04 -05:00
parent 207d08537d
commit f42da61fc8

View File

@ -517,7 +517,14 @@ class Marionette(object):
def cleanup(self):
if self.session:
self.delete_session()
try:
self.delete_session()
except (MarionetteException, socket.error):
# These exceptions get thrown if the Marionette server
# hit an exception/died or the connection died. We can
# do no further server-side cleanup in this case.
pass
self.session = None
if self.emulator:
self.emulator.close()
if self.instance: