From 612063d87d9f53dccbe32952caf762f5400b3512 Mon Sep 17 00:00:00 2001 From: Malini Das Date: Thu, 30 Jan 2014 15:14:04 -0500 Subject: [PATCH] Bug 965782 - ignore certain delete_session exceptions in Marionette cleanup, r=wlach --- testing/marionette/client/marionette/marionette.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/testing/marionette/client/marionette/marionette.py b/testing/marionette/client/marionette/marionette.py index 006b523efed5..eff570ad3bd6 100644 --- a/testing/marionette/client/marionette/marionette.py +++ b/testing/marionette/client/marionette/marionette.py @@ -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: