getpelican/pelican — pull request #781 by fe-lix- (2013-03-16 18:33:54+00:00)
Title: Getting an explicit error message on server creation

When using `make serve` and the port is already in used you get this message :+1:

$ make serve
cd /home/felix/Work/sites/mysite/output && python -m pelican.server
Traceback (most recent call last):/.virtualenvs/pelican/lib/python3.3/site-packages/pelican-3.2-py3.3.egg/pelican/server.py", line 16, in
httpd = socketserver.TCPServer(("", PORT), Handler)
File "/usr/lib64/python3.3/socketserver.py", line 430, in __init__
self.server_bind()
File "/usr/lib64/python3.3/socketserver.py", line 441, in server_bind
self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use
make: *** [serve] Error 1

This kind of message is probably more readable :

$ make serve
cd /home/felix/Work/sites/mysite/output && python -m pelican.server
Could not listen on port 8000
make: *** [serve] Error 1