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

Side by Side Diff: native_client_sdk/src/build_tools/tests/test_server.py

Issue 10835019: Fix license headers in a number of files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix case Created 8 years, 4 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 4
5 import multiprocessing 5 import multiprocessing
6 import os 6 import os
7 7
8 8
9 class LocalHTTPServer(object): 9 class LocalHTTPServer(object):
10 """Class to start a local HTTP server as a child process.""" 10 """Class to start a local HTTP server as a child process."""
11 11
12 def __init__(self, serve_dir): 12 def __init__(self, serve_dir):
13 parent_conn, child_conn = multiprocessing.Pipe() 13 parent_conn, child_conn = multiprocessing.Pipe()
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 httpd = BaseHTTPServer.HTTPServer(('', 0), 56 httpd = BaseHTTPServer.HTTPServer(('', 0),
57 SimpleHTTPServer.SimpleHTTPRequestHandler) 57 SimpleHTTPServer.SimpleHTTPRequestHandler)
58 conn.send(httpd.server_address[1]) # the chosen port number 58 conn.send(httpd.server_address[1]) # the chosen port number
59 httpd.timeout = 0.5 # seconds 59 httpd.timeout = 0.5 # seconds
60 running = True 60 running = True
61 while running: 61 while running:
62 httpd.handle_request() 62 httpd.handle_request()
63 if conn.poll(): 63 if conn.poll():
64 running = conn.recv() 64 running = conn.recv()
65 conn.close() 65 conn.close()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698