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

Side by Side Diff: media/tools/constrained_network_server/cns.py

Issue 8672007: Fix python scripts in src/media (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
« no previous file with comments | « no previous file | media/tools/constrained_network_server/cns_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/env python
2
3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 4 # found in the LICENSE file.
6 5
7 """Constrained Network Server. Serves files with supplied network constraints. 6 """Constrained Network Server. Serves files with supplied network constraints.
8 7
9 The CNS exposes a web based API allowing network constraints to be imposed on 8 The CNS exposes a web based API allowing network constraints to be imposed on
10 file serving. 9 file serving.
11 10
12 TODO(dalecurtis): Add some more docs here. 11 TODO(dalecurtis): Add some more docs here.
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 try: 265 try:
267 cherrypy.quickstart(ConstrainedNetworkServer(options, pa)) 266 cherrypy.quickstart(ConstrainedNetworkServer(options, pa))
268 finally: 267 finally:
269 # Disable Ctrl-C handler to prevent interruption of cleanup. 268 # Disable Ctrl-C handler to prevent interruption of cleanup.
270 signal.signal(signal.SIGINT, lambda signal, frame: None) 269 signal.signal(signal.SIGINT, lambda signal, frame: None)
271 pa.Cleanup(all_ports=True) 270 pa.Cleanup(all_ports=True)
272 271
273 272
274 if __name__ == '__main__': 273 if __name__ == '__main__':
275 Main() 274 Main()
OLDNEW
« no previous file with comments | « no previous file | media/tools/constrained_network_server/cns_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698