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

Side by Side Diff: mojo/devtools/common/devtoolslib/http_server.py

Issue 1291733002: Add command to kill stray mojo shell servers so we don't have to remember it (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 atexit 5 import atexit
6 import datetime 6 import datetime
7 import email.utils 7 import email.utils
8 import errno 8 import errno
9 import gzip 9 import gzip
10 import hashlib 10 import hashlib
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 215
216 http_thread = threading.Thread(target=httpd.serve_forever) 216 http_thread = threading.Thread(target=httpd.serve_forever)
217 http_thread.daemon = True 217 http_thread.daemon = True
218 http_thread.start() 218 http_thread.start()
219 return httpd.server_address 219 return httpd.server_address
220 except socket.error as v: 220 except socket.error as v:
221 error_code = v[0] 221 error_code = v[0]
222 print 'Failed to start http server for %s on port %d: %s.' % ( 222 print 'Failed to start http server for %s on port %d: %s.' % (
223 str(mappings), host_port, os.strerror(error_code)) 223 str(mappings), host_port, os.strerror(error_code))
224 if error_code == errno.EADDRINUSE: 224 if error_code == errno.EADDRINUSE:
225 print (' Run `fuser %d/tcp` to find out which process is using the port.' 225 print (' Run `fuser %d/tcp` to find out which process is using the port;'
226 % host_port) 226 % host_port)
227 print (' or `fuser -k %d/tcp` terminate it.' % host_port)
227 print '---' 228 print '---'
228 raise 229 raise
OLDNEW
« 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