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
Родитель aa8ede1cff
Коммит 612063d87d
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -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: