Bug 1017022 - call close() on a valid object, r=jgriffin
authorMalini Das <mdas@mozilla.com>
Mon, 02 Jun 2014 11:01:28 -0400
changeset 205391 d70a6a2ddfd2b0a82feaafd4273258b3e1ef38bf
parent 205390 68c0c1d83ea299f8efbe60136ce0c418b46cb359
child 205392 ac7043963695f9404427d7c6c4a4cf6594d54d63
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgriffin
bugs1017022
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1017022 - call close() on a valid object, r=jgriffin
testing/marionette/transport/marionette_transport/transport.py
--- a/testing/marionette/transport/marionette_transport/transport.py
+++ b/testing/marionette/transport/marionette_transport/transport.py
@@ -98,10 +98,11 @@ class MarionetteTransport(object):
                     raise e
 
         response = self.receive()
         return response
 
     def close(self):
         """ Close the socket.
         """
-        self.sock.close()
+        if self.sock:
+            self.sock.close()
         self.sock = None