Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9173)

Unified Diff: chrome/test/pyautolib/remote_host.py

Issue 7841010: PyAuto remote_host Mac fixes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial commit. Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/pyautolib/remote_host.py
diff --git a/chrome/test/pyautolib/remote_host.py b/chrome/test/pyautolib/remote_host.py
index 9d9e2c99fd6383066633810c404371a84def6067..04610b2e6746d657f0db524a39e87396f239fd1b 100644
--- a/chrome/test/pyautolib/remote_host.py
+++ b/chrome/test/pyautolib/remote_host.py
@@ -34,8 +34,11 @@ class RemoteHost(object):
def StopSocketServer(self):
if self._socket:
- self._socket.shutdown(socket.SHUT_RDWR)
- self._socket.close()
+ try:
+ self._socket.shutdown(socket.SHUT_RDWR)
+ self._socket.close()
+ except socket.error:
+ pass
self._socket = None
def Connected(self):
@@ -76,7 +79,7 @@ class RemoteHost(object):
result = getattr(self, request[0])(*request[1], **request[2])
else:
result = getattr(self.target, request[0])(*request[1], **request[2])
- except BaseException as e:
+ except BaseException, e:
exception = (e.__class__.__name__, str(e))
# Put output back to the way it was before.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698