Mercurial > hg
changeset 1177:862f53c1d0f9
hg serve: print a more useful error message if server can't start.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Wed, 31 Aug 2005 11:19:20 -0700 |
parents | ba4ce38b90a3 |
children | a7abffa4b19f |
files | mercurial/commands.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Aug 31 10:54:46 2005 -0700 +++ b/mercurial/commands.py Wed Aug 31 11:19:20 2005 -0700 @@ -1386,7 +1386,10 @@ if opts[o]: ui.setconfig("web", o, opts[o]) - httpd = hgweb.create_server(repo) + try: + httpd = hgweb.create_server(repo) + except socket.error, inst: + raise util.Abort('cannot start server: ' + inst.args[1]) if ui.verbose: addr, port = httpd.socket.getsockname()