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

Unified Diff: lib/cros_test_proxy.py

Issue 6331007: Use different proxy ports, and log port conflicts. Hopefully works around (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Created 9 years, 11 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 | « bin/cros_au_test_harness.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/cros_test_proxy.py
diff --git a/lib/cros_test_proxy.py b/lib/cros_test_proxy.py
index 21709829c35c26049b365c35f2d6bbdab21992e9..e505c542b98bacce7f28ecfdebeb587ed0d3c5f2 100755
--- a/lib/cros_test_proxy.py
+++ b/lib/cros_test_proxy.py
@@ -100,9 +100,14 @@ class CrosTestProxy(SocketServer.ThreadingMixIn, SocketServer.TCPServer):
self.port_out = port_out
self.filter = filter
- SocketServer.TCPServer.__init__(self,
- ('', port_in),
- self._Handler)
+ try:
+ SocketServer.TCPServer.__init__(self,
+ ('', port_in),
+ self._Handler)
+ except socket.error:
+ import os
sosa 2011/01/19 20:07:55 please import os at the top
+ os.system("sudo netstat -l --tcp -n -p")
sosa 2011/01/19 20:07:55 use '' rather than "" to be consistent.
+ raise
def serve_forever_in_thread(self):
"""Helper method to start the server in a new background thread."""
« no previous file with comments | « bin/cros_au_test_harness.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698