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

Side by Side Diff: tools/telemetry/telemetry/core/util.py

Issue 12278015: [Telemetry] Reorganize everything. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-add shebangs. Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 import inspect 4 import inspect
5 import socket 5 import socket
6 import time 6 import time
7 7
8 class TimeoutException(Exception): 8 class TimeoutException(Exception):
9 pass 9 pass
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 self.local_port = local_port 59 self.local_port = local_port
60 self.remote_port = remote_port 60 self.remote_port = remote_port
61 61
62 def GetAvailableLocalPort(): 62 def GetAvailableLocalPort():
63 tmp = socket.socket() 63 tmp = socket.socket()
64 tmp.bind(('', 0)) 64 tmp.bind(('', 0))
65 port = tmp.getsockname()[1] 65 port = tmp.getsockname()[1]
66 tmp.close() 66 tmp.close()
67 67
68 return port 68 return port
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/core/user_agent_unittest.py ('k') | tools/telemetry/telemetry/core/util_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698